ts-ref-kit 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/parser/index.cjs +3 -0
- package/dist/esm/parser/index.js +3 -3
- package/dist/types/index.d.ts +455 -0
- package/{types/parser/reflect-parser.d.ts → dist/types/parser/index.d.ts} +110 -77
- package/dist/types/tsdoc-metadata.json +11 -0
- package/package.json +15 -8
- package/dist/cjs/parser/index.js +0 -3
- package/types/index.d.ts +0 -2
- package/types/parser/index.d.ts +0 -3
- package/types/parser/path-match.d.ts +0 -7
- package/types/parser/reflect-loader.d.ts +0 -10
- package/types/parser/reflect-parser-plugin.d.ts +0 -7
- package/types/reflect-json/Mappable.d.ts +0 -13
- package/types/reflect-json/decorate.d.ts +0 -18
- package/types/reflect-json/index.d.ts +0 -6
- package/types/reflect-json/json-translation.d.ts +0 -38
- package/types/reflect-json/reflect-extension.d.ts +0 -13
- package/types/reflect-json/types.d.ts +0 -15
- package/types/reflect-json/utils.d.ts +0 -9
- package/types/reflect-types/ClassDefinition.d.ts +0 -28
- package/types/reflect-types/EnumDefinition.d.ts +0 -8
- package/types/reflect-types/InterfaceDefinition.d.ts +0 -18
- package/types/reflect-types/MethodDefinition.d.ts +0 -15
- package/types/reflect-types/PropertyDefinition.d.ts +0 -18
- package/types/reflect-types/assert-type.d.ts +0 -14
- package/types/reflect-types/function-validate.d.ts +0 -10
- package/types/reflect-types/index.d.ts +0 -11
- package/types/reflect-types/package.d.ts +0 -10
- package/types/reflect-types/reflect-context.d.ts +0 -16
- package/types/reflect-types/reflect-definitions.d.ts +0 -104
- package/types/reflect-types/reflect-types.d.ts +0 -20
- package/types/reflect-types/reflect-validate.d.ts +0 -24
- /package/dist/cjs/{index.js → index.cjs} +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { ClassDefinition, PropertyDefinition } from './index';
|
|
2
|
-
export interface RawTypeDefinition {
|
|
3
|
-
arrayElementType?: RawTypeDef;
|
|
4
|
-
literalValue?: unknown;
|
|
5
|
-
typeLiteralMembers?: RawPropertyDefinition[];
|
|
6
|
-
unionMembers?: RawTypeDef[];
|
|
7
|
-
intersectionMembers?: RawTypeDef[];
|
|
8
|
-
isFunction?: boolean;
|
|
9
|
-
tupleMembers?: RawTypeDef[];
|
|
10
|
-
isOptionalInTuple?: boolean;
|
|
11
|
-
isConstructor?: boolean;
|
|
12
|
-
generics?: RawTypeDef[];
|
|
13
|
-
}
|
|
14
|
-
type RawTypeDef = string | RawTypeDefinition;
|
|
15
|
-
export interface RawClassDefinition {
|
|
16
|
-
name: string;
|
|
17
|
-
superClassName?: string;
|
|
18
|
-
implementations?: string[];
|
|
19
|
-
methods?: RawMethodDefinition[];
|
|
20
|
-
properties?: RawPropertyDefinition[];
|
|
21
|
-
}
|
|
22
|
-
export interface RawInterfaceDefinition {
|
|
23
|
-
name: string;
|
|
24
|
-
implementations?: string[];
|
|
25
|
-
methods?: RawMethodDefinition[];
|
|
26
|
-
properties?: RawPropertyDefinition[];
|
|
27
|
-
}
|
|
28
|
-
export interface RawEnumDefinition {
|
|
29
|
-
name: string;
|
|
30
|
-
members: {
|
|
31
|
-
name: string;
|
|
32
|
-
initializer: string | undefined;
|
|
33
|
-
}[];
|
|
34
|
-
}
|
|
35
|
-
export interface RawMethodDefinition {
|
|
36
|
-
name: string;
|
|
37
|
-
isPrivate?: boolean;
|
|
38
|
-
isStatic?: boolean;
|
|
39
|
-
isAsync?: boolean;
|
|
40
|
-
returnType?: RawTypeDef;
|
|
41
|
-
args?: {
|
|
42
|
-
name: string;
|
|
43
|
-
type?: RawTypeDef;
|
|
44
|
-
isOptional: boolean;
|
|
45
|
-
}[];
|
|
46
|
-
}
|
|
47
|
-
export interface RawPropertyDefinition {
|
|
48
|
-
name: string;
|
|
49
|
-
isOptional?: boolean;
|
|
50
|
-
isPrivate?: boolean;
|
|
51
|
-
isStatic?: boolean;
|
|
52
|
-
type?: RawTypeDef;
|
|
53
|
-
accessor?: {
|
|
54
|
-
getter?: {
|
|
55
|
-
isPrivate: boolean;
|
|
56
|
-
};
|
|
57
|
-
setter?: {
|
|
58
|
-
isPrivate: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export interface TypeDefinition {
|
|
63
|
-
name?: string;
|
|
64
|
-
arrayElementType?: TypeDefinition;
|
|
65
|
-
literalValue?: string;
|
|
66
|
-
typeLiteralMembers?: PropertyDefinition[];
|
|
67
|
-
unionMembers?: TypeDefinition[];
|
|
68
|
-
intersectionMembers?: TypeDefinition[];
|
|
69
|
-
isFunction?: boolean;
|
|
70
|
-
tupleMembers?: TypeDefinition[];
|
|
71
|
-
isOptionalInTuple?: boolean;
|
|
72
|
-
isConstructor?: boolean;
|
|
73
|
-
generics?: TypeDefinition[];
|
|
74
|
-
classDefinition?: ClassDefinition;
|
|
75
|
-
}
|
|
76
|
-
export declare function isIgnoredType(type: TypeDefinition): boolean;
|
|
77
|
-
export declare function isPrimitiveType(type: TypeDefinition): type is {
|
|
78
|
-
name: string;
|
|
79
|
-
};
|
|
80
|
-
export declare function isArrayType(type: TypeDefinition): type is {
|
|
81
|
-
arrayElementType: TypeDefinition;
|
|
82
|
-
};
|
|
83
|
-
export declare function isLiteralType(type: TypeDefinition): type is {
|
|
84
|
-
literalValue: string;
|
|
85
|
-
};
|
|
86
|
-
export declare function isTypeLiteralType(type: TypeDefinition): type is {
|
|
87
|
-
typeLiteralMembers: PropertyDefinition[];
|
|
88
|
-
};
|
|
89
|
-
export declare function isUnionType(type: TypeDefinition): type is {
|
|
90
|
-
unionMembers: TypeDefinition[];
|
|
91
|
-
};
|
|
92
|
-
export declare function isIntersectionType(type: TypeDefinition): type is {
|
|
93
|
-
intersectionMembers: TypeDefinition[];
|
|
94
|
-
};
|
|
95
|
-
export declare function isTupleType(type: TypeDefinition): type is {
|
|
96
|
-
tupleMembers: TypeDefinition[];
|
|
97
|
-
};
|
|
98
|
-
export declare function isClassDefinition(type: TypeDefinition): type is {
|
|
99
|
-
classDefinition: ClassDefinition;
|
|
100
|
-
};
|
|
101
|
-
export declare function hasGenerics(type: TypeDefinition): type is {
|
|
102
|
-
generics: TypeDefinition[];
|
|
103
|
-
};
|
|
104
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type RawTypeDefinition, type TypeDefinition } from './index';
|
|
2
|
-
import { ClassDefinition, EnumDefinition, InterfaceDefinition } from './index';
|
|
3
|
-
import { type AnyConstructorFunction } from './package';
|
|
4
|
-
export declare const anyType: {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const nullType: {
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function getClassDefinition(arg: AnyConstructorFunction | object | string): ClassDefinition | undefined;
|
|
11
|
-
export declare function getInterfaceDefinition(name: string): InterfaceDefinition | undefined;
|
|
12
|
-
export declare function getEnumDefinition(name: string): EnumDefinition | undefined;
|
|
13
|
-
export declare function getTypeAliasDefinition(name: string): TypeDefinition | undefined;
|
|
14
|
-
export declare function getTypeDefinition(typeName: string): TypeDefinition;
|
|
15
|
-
export declare function getEnumNames(enumName: string): string[];
|
|
16
|
-
export declare function getEnumValues(args: {
|
|
17
|
-
[enumName: string]: Record<string, string | number>;
|
|
18
|
-
}): (string | number)[];
|
|
19
|
-
export declare function fillType(rawType: RawTypeDefinition | string | undefined): TypeDefinition;
|
|
20
|
-
export type EnableReflect = object;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type TypeDefinition } from './index';
|
|
2
|
-
import { type Dictionary } from './package';
|
|
3
|
-
interface ValidateResult {
|
|
4
|
-
success: boolean;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function validateValue(value: unknown, type: TypeDefinition, depth?: number): ValidateResult;
|
|
8
|
-
export declare function validateInstance<T extends object>(instance: T, typeName?: string, depth?: number): ValidateResult;
|
|
9
|
-
export declare function validateArray<T extends object>(array: T[], typeName?: string, depth?: number): ValidateResult;
|
|
10
|
-
export declare function validateDictionary<T extends object>(dict: Dictionary<T>, typeName?: string, depth?: number): ValidateResult;
|
|
11
|
-
interface FailureResult extends ValidateResult {
|
|
12
|
-
cause?: FailureResult;
|
|
13
|
-
}
|
|
14
|
-
export declare function getErrorTraceMessages(failureResult: FailureResult): string;
|
|
15
|
-
export declare function validateFunctionArgument(args: {
|
|
16
|
-
funcName: string;
|
|
17
|
-
optionsObj?: object;
|
|
18
|
-
value?: unknown;
|
|
19
|
-
argName: string;
|
|
20
|
-
type: string;
|
|
21
|
-
optional?: boolean;
|
|
22
|
-
}): void;
|
|
23
|
-
export declare function safeSetValue(target: object, propName: string, value: unknown): void;
|
|
24
|
-
export {};
|
|
File without changes
|