Installation
npm install --save @types/json-mask
Summary
This package contains type definitions for json-mask (https://github.com/nemtsov/json-mask#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-mask.
index.d.ts
type DeepPartial<T> = T extends any[] ? Array<T[number]>
: T extends Record<string, any> ? {
[P in keyof T]?: DeepPartial<T[P]>;
}
: T;
interface Prop {
type: "array" | "object" | undefined;
isWildcard: true | undefined;
properties: Props;
}
interface Props {
[value: string]: Prop;
}
type Mask = (<T>(obj: T, mask: string | undefined | null) => DeepPartial<T> | null) & {
compile: (text: string | undefined | null) => Props | null;
filter: <T>(obj: T, compiledMask: Props | undefined | null) => DeepPartial<T> | null;
};
declare const mask: Mask;
export = mask;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Simon Dean.