@golemcloud/golem-ts-typegen 1.0.0-dev.4 → 1.0.0-dev.6

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.
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,2 +0,0 @@
1
- export declare function normalizeCliPath(inputPath: string, cwd?: string): string;
2
- export declare function normalizeFilePatterns(patterns: string[], cwd?: string): string[];
@@ -1,25 +0,0 @@
1
- import { Node as TsMorphNode, SourceFile, Type as TsMorphType } from 'ts-morph';
2
- import { Type } from '@golemcloud/golem-ts-types-core';
3
- export declare function getTypeFromTsMorph(tsMorphType: TsMorphType, isOptional: boolean, sourceTypeNode?: TsMorphNode): Type.Type;
4
- export declare function getRawTypeName(type: TsMorphType): string | undefined;
5
- export declare function getAliasTypeName(type: TsMorphType): string | undefined;
6
- export declare function getTypeOwner(type: TsMorphType, sourceTypeNode?: TsMorphNode): string | undefined;
7
- export declare function unwrapAlias(type: TsMorphType): TsMorphType;
8
- /**
9
- *
10
- * Configuration for generating class metadata.
11
- * - sourceFiles: Array of ts-morph SourceFile objects to extract metadata from.
12
- * - classDecorators: Array of decorator names to filter classes. If empty, all classes are included.
13
- * - includeOnlyPublicScope: If true, only public constructors and methods are included
14
- */
15
- export type ClassMetadataGenConfig = {
16
- sourceFiles: SourceFile[];
17
- classDecorators: string[];
18
- includeOnlyPublicScope: boolean;
19
- excludeOverriddenMethods: boolean;
20
- };
21
- export declare function generateClassMetadata(classMetadataGenConfig: ClassMetadataGenConfig): string;
22
- export declare function updateMetadataFromSourceFiles(classMetadataGenConfig: ClassMetadataGenConfig): void;
23
- export declare function saveAndClearInMemoryMetadata(): string;
24
- export declare function lazyLoadTypeMetadata(): void;
25
- export declare function loadTypeMetadataFromJsonFile(): void;
@@ -1,3 +0,0 @@
1
- export type ImportedSourceOrderedUnion = number | string | boolean | {
2
- n: number;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,118 +0,0 @@
1
- interface SimpleInterfaceType {
2
- n: number;
3
- }
4
- export type PromiseType = Promise<string>;
5
- export type ObjectType = {
6
- a: string;
7
- b: number;
8
- c: boolean;
9
- };
10
- export type UnionType = number | string | boolean | ObjectType;
11
- export type ListType = Array<string>;
12
- export type ListComplexType = Array<ObjectType>;
13
- export type TupleType = [string, number, boolean];
14
- export type TupleComplexType = [string, number, ObjectType];
15
- export type MapType = Map<string, number>;
16
- export type BooleanType = boolean;
17
- export type StringType = string;
18
- export type NumberType = number;
19
- export type MultimodalType<T> = T[];
20
- export type UnionComplexType = number | string | boolean | ObjectComplexType | UnionType | TupleType | TupleComplexType | SimpleInterfaceType;
21
- export type ObjectComplexType = {
22
- a: string;
23
- b: number;
24
- c: boolean;
25
- d: ObjectType;
26
- e: UnionType;
27
- f: ListType;
28
- g: ListComplexType;
29
- h: TupleType;
30
- i: TupleComplexType;
31
- j: MapType;
32
- k: SimpleInterfaceType;
33
- };
34
- export declare class FooBar {
35
- name: string;
36
- value: number;
37
- constructor(name: string, value: number);
38
- }
39
- export type EitherX = {
40
- ok?: string;
41
- err?: string;
42
- };
43
- export type EitherY = {
44
- tag: 'ok';
45
- val: string;
46
- } | {
47
- tag: 'err';
48
- val: string;
49
- };
50
- export type EitherZ = {
51
- tag: 'ok';
52
- val: string;
53
- } | {
54
- tag: 'err';
55
- val?: string;
56
- };
57
- export interface TestInterfaceType {
58
- numberProp: number;
59
- stringProp: string;
60
- booleanProp: boolean;
61
- bigintProp: bigint;
62
- nullProp: null;
63
- trueProp: true;
64
- falseProp: false;
65
- optionalProp?: number;
66
- nestedProp: SimpleInterfaceType;
67
- unionProp: UnionType;
68
- unionComplexProp: UnionComplexType;
69
- objectProp: ObjectType;
70
- objectComplexProp: ObjectComplexType;
71
- listProp: ListType;
72
- listObjectProp: ListComplexType;
73
- tupleProp: TupleType;
74
- tupleObjectProp: TupleComplexType;
75
- mapProp: MapType;
76
- uint8ArrayProp: Uint8Array;
77
- uint16ArrayProp: Uint16Array;
78
- uint32ArrayProp: Uint32Array;
79
- uint64ArrayProp: BigUint64Array;
80
- int8ArrayProp: Int8Array;
81
- int16ArrayProp: Int16Array;
82
- int32ArrayProp: Int32Array;
83
- int64ArrayProp: BigInt64Array;
84
- float32ArrayProp: Float32Array;
85
- float64ArrayProp: Float64Array;
86
- }
87
- export type RecordType = Record<string, number>;
88
- export type MyCode = string;
89
- export type ObjectWithTypeParameter<C extends MyCode[] = []> = {
90
- a: C;
91
- };
92
- export type UnionWithTypeParameter<C extends MyCode[] = []> = {
93
- a: C;
94
- } | {
95
- b: C;
96
- };
97
- export declare class Secret<T> {
98
- }
99
- export declare class Config<T> {
100
- }
101
- type AliasedNested = {
102
- c: number;
103
- };
104
- type AgentConfig = {
105
- foo: number;
106
- bar: string;
107
- secret: Secret<boolean>;
108
- nested: {
109
- nestedSecret: Secret<number>;
110
- a: boolean;
111
- b: number[];
112
- };
113
- aliasedNested: AliasedNested;
114
- };
115
- export declare class ConfigAgent {
116
- constructor(config: Config<AgentConfig>);
117
- }
118
- export {};
@@ -1,31 +0,0 @@
1
- import { Type } from '@golemcloud/golem-ts-types-core';
2
- import './setup';
3
- /**
4
- * getAll functionality reads the type metadata from .metadata directory
5
- * The type metadata is loaded to type metadata
6
- * by `setup` module.
7
- */
8
- export declare function getAll(): Map<string, import("@golemcloud/golem-ts-types-core").ClassMetadata>;
9
- export declare function getInterfaceType(): Type.Type;
10
- export declare function getTestMapType(): Type.Type;
11
- export declare function getObjectType(): Type.Type;
12
- export declare function getComplexObjectType(): Type.Type;
13
- export declare function getTestListOfObjectType(): Type.Type;
14
- export declare function getUnionType(): Type.Type;
15
- export declare function getUnionComplexType(): Type.Type;
16
- export declare function getTupleType(): Type.Type;
17
- export declare function getBooleanType(): Type.Type;
18
- export declare function getStringType(): Type.Type;
19
- export declare function getNumberType(): Type.Type;
20
- export declare function getPromiseType(): Type.Type;
21
- export declare function getClassType(): Type.Type;
22
- export declare function getLiterallyObjectType(): Type.Type;
23
- export declare function getRecursiveType(): Type.Type;
24
- export declare function getObjectWithTypeParameter(): Type.Type;
25
- export declare function getUnionWithTypeParameter(): Type.Type;
26
- export declare function getImportedSourceOrderedUnion(): Type.Type;
27
- export declare function getConstructorParams(className: string): Array<{
28
- name: string;
29
- type: Type.Type;
30
- }>;
31
- export declare function getMethodParams(className: string, methodName: string): Map<string, Type.Type>;