@typespec/compiler 0.44.0-dev.21 → 0.44.0-dev.23
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/core/checker.d.ts +7 -4
- package/dist/core/checker.d.ts.map +1 -1
- package/dist/core/checker.js +31 -16
- package/dist/core/checker.js.map +1 -1
- package/dist/core/helpers/type-name-utils.js +1 -1
- package/dist/core/helpers/type-name-utils.js.map +1 -1
- package/dist/core/semantic-walker.d.ts.map +1 -1
- package/dist/core/semantic-walker.js +15 -4
- package/dist/core/semantic-walker.js.map +1 -1
- package/dist/core/type-utils.d.ts +7 -1
- package/dist/core/type-utils.d.ts.map +1 -1
- package/dist/core/type-utils.js +19 -3
- package/dist/core/type-utils.js.map +1 -1
- package/dist/core/types.d.ts +8 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/manifest.js +1 -1
- package/package.json +4 -4
package/dist/core/checker.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TypeNameOptions } from "./helpers/index.js";
|
|
2
2
|
import { Program, ProjectedProgram } from "./program.js";
|
|
3
|
-
import { BooleanLiteral, BooleanLiteralNode, Diagnostic, DiagnosticTarget, ErrorType, FunctionType, IdentifierNode, IntrinsicScalarName, JsSourceFileNode, LiteralNode, LiteralType, Model, ModelProperty, Namespace, NamespaceStatementNode, NeverType, Node, NumericLiteral, NumericLiteralNode, ProjectionNode, ProjectionStatementNode, Scalar, StdTypeName, StdTypes, StringLiteral, StringLiteralNode, Sym, Type,
|
|
3
|
+
import { BooleanLiteral, BooleanLiteralNode, Diagnostic, DiagnosticTarget, ErrorType, FunctionType, IdentifierNode, IntrinsicScalarName, JsSourceFileNode, LiteralNode, LiteralType, Model, ModelProperty, Namespace, NamespaceStatementNode, NeverType, Node, NumericLiteral, NumericLiteralNode, ProjectionNode, ProjectionStatementNode, Scalar, StdTypeName, StdTypes, StringLiteral, StringLiteralNode, Sym, Type, TypeReferenceNode, TypeSpecScriptNode, UnknownType, VoidType } from "./types.js";
|
|
4
|
+
export type CreateTypeProps = Omit<Type, "isFinished" | keyof TypePrototype>;
|
|
4
5
|
export interface Checker {
|
|
5
6
|
typePrototype: TypePrototype;
|
|
6
7
|
getTypeForNode(node: Node): Type;
|
|
@@ -30,8 +31,10 @@ export interface Checker {
|
|
|
30
31
|
project(target: Type, projection: ProjectionNode, args?: (Type | string | number | boolean)[]): Type;
|
|
31
32
|
resolveIdentifier(node: IdentifierNode): Sym | undefined;
|
|
32
33
|
resolveCompletions(node: IdentifierNode): Map<string, TypeSpecCompletionItem>;
|
|
33
|
-
createType<T>(typeDef: T): T & TypePrototype
|
|
34
|
-
|
|
34
|
+
createType<T extends Type extends any ? CreateTypeProps : never>(typeDef: T): T & TypePrototype & {
|
|
35
|
+
isFinished: boolean;
|
|
36
|
+
};
|
|
37
|
+
createAndFinishType<T extends Type extends any ? CreateTypeProps : never>(typeDef: T): T & TypePrototype;
|
|
35
38
|
finishType<T extends Type>(typeDef: T): T;
|
|
36
39
|
createFunctionType(fn: (...args: Type[]) => Type): FunctionType;
|
|
37
40
|
createLiteralType(value: string, node?: StringLiteralNode): StringLiteral;
|
|
@@ -128,6 +131,6 @@ export declare function getOverriddenProperty(property: ModelProperty): ModelPro
|
|
|
128
131
|
* Properties that are overridden are not enumerated.
|
|
129
132
|
*/
|
|
130
133
|
export declare function walkPropertiesInherited(model: Model): Generator<ModelProperty, void, unknown>;
|
|
131
|
-
export declare function finishTypeForProgram<T extends Type>(program: Program, typeDef: T
|
|
134
|
+
export declare function finishTypeForProgram<T extends Type>(program: Program, typeDef: T): T;
|
|
132
135
|
export {};
|
|
133
136
|
//# sourceMappingURL=checker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../../core/checker.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAqC,MAAM,oBAAoB,CAAC;AAG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AgnJvD;AAqFD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,OAAO,GAC5C,KAAK,CAyEP;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,GAAG,gBAAgB,EACnC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,OAAO,GAC3C,KAAK,CAmCP;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS,CAcxF;AAED;;;;;;;GAOG;AACH,wBAAiB,uBAAuB,CAAC,KAAK,EAAE,KAAK,2CAapD;AAYD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAEpF"}
|
package/dist/core/checker.js
CHANGED
|
@@ -948,7 +948,8 @@ export function createChecker(program) {
|
|
|
948
948
|
properties.set(prop.name, newPropType);
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
|
|
951
|
+
linkMapper(intersection, mapper);
|
|
952
|
+
return finishType(intersection);
|
|
952
953
|
}
|
|
953
954
|
function checkArrayExpression(node, mapper) {
|
|
954
955
|
const elementType = getTypeForNode(node.elementType, mapper);
|
|
@@ -1109,17 +1110,20 @@ export function createChecker(program) {
|
|
|
1109
1110
|
decorators.push(...checkDecorators(operationType, node, mapper));
|
|
1110
1111
|
operationType.parameters.namespace = namespace;
|
|
1111
1112
|
const parent = node.parent;
|
|
1113
|
+
linkMapper(operationType, mapper);
|
|
1112
1114
|
if (parent.kind === SyntaxKind.InterfaceStatement) {
|
|
1113
1115
|
if (shouldCreateTypeForTemplate(parent, mapper) &&
|
|
1114
1116
|
shouldCreateTypeForTemplate(node, mapper)) {
|
|
1115
|
-
finishType(operationType
|
|
1117
|
+
finishType(operationType);
|
|
1116
1118
|
}
|
|
1117
1119
|
}
|
|
1118
1120
|
else {
|
|
1119
1121
|
if (shouldCreateTypeForTemplate(node, mapper)) {
|
|
1120
|
-
finishType(operationType
|
|
1122
|
+
finishType(operationType);
|
|
1123
|
+
}
|
|
1124
|
+
if (mapper === undefined) {
|
|
1125
|
+
namespace === null || namespace === void 0 ? void 0 : namespace.operations.set(name, operationType);
|
|
1121
1126
|
}
|
|
1122
|
-
namespace === null || namespace === void 0 ? void 0 : namespace.operations.set(name, operationType);
|
|
1123
1127
|
}
|
|
1124
1128
|
if (links) {
|
|
1125
1129
|
linkType(links, operationType, mapper);
|
|
@@ -1731,8 +1735,9 @@ export function createChecker(program) {
|
|
|
1731
1735
|
mutate(sym).type = prop;
|
|
1732
1736
|
}
|
|
1733
1737
|
}
|
|
1738
|
+
linkMapper(type, mapper);
|
|
1734
1739
|
if (shouldCreateTypeForTemplate(node, mapper)) {
|
|
1735
|
-
finishType(type
|
|
1740
|
+
finishType(type);
|
|
1736
1741
|
}
|
|
1737
1742
|
const indexer = getIndexer(program, type);
|
|
1738
1743
|
if (type.name === "Array" && isInTypeSpecNamespace(type)) {
|
|
@@ -2195,8 +2200,9 @@ export function createChecker(program) {
|
|
|
2195
2200
|
}
|
|
2196
2201
|
type.decorators = checkDecorators(type, prop, mapper);
|
|
2197
2202
|
const parentTemplate = getParentTemplateNode(prop);
|
|
2203
|
+
linkMapper(type, mapper);
|
|
2198
2204
|
if (!parentTemplate || shouldCreateTypeForTemplate(parentTemplate, mapper)) {
|
|
2199
|
-
finishType(type
|
|
2205
|
+
finishType(type);
|
|
2200
2206
|
}
|
|
2201
2207
|
return type;
|
|
2202
2208
|
}
|
|
@@ -2398,8 +2404,9 @@ export function createChecker(program) {
|
|
|
2398
2404
|
if (mapper === undefined) {
|
|
2399
2405
|
(_a = type.namespace) === null || _a === void 0 ? void 0 : _a.scalars.set(type.name, type);
|
|
2400
2406
|
}
|
|
2407
|
+
linkMapper(type, mapper);
|
|
2401
2408
|
if (shouldCreateTypeForTemplate(node, mapper)) {
|
|
2402
|
-
finishType(type
|
|
2409
|
+
finishType(type);
|
|
2403
2410
|
}
|
|
2404
2411
|
if (isInTypeSpecNamespace(type)) {
|
|
2405
2412
|
stdTypes[type.name] = type;
|
|
@@ -2496,7 +2503,8 @@ export function createChecker(program) {
|
|
|
2496
2503
|
enumType.namespace = namespace;
|
|
2497
2504
|
(_a = enumType.namespace) === null || _a === void 0 ? void 0 : _a.enums.set(enumType.name, enumType);
|
|
2498
2505
|
enumType.decorators = checkDecorators(enumType, node, mapper);
|
|
2499
|
-
|
|
2506
|
+
linkMapper(enumType, mapper);
|
|
2507
|
+
finishType(enumType);
|
|
2500
2508
|
}
|
|
2501
2509
|
return links.type;
|
|
2502
2510
|
}
|
|
@@ -2545,8 +2553,9 @@ export function createChecker(program) {
|
|
|
2545
2553
|
for (const [key, value] of ownMembers) {
|
|
2546
2554
|
interfaceType.operations.set(key, value);
|
|
2547
2555
|
}
|
|
2556
|
+
linkMapper(interfaceType, mapper);
|
|
2548
2557
|
if (shouldCreateTypeForTemplate(node, mapper)) {
|
|
2549
|
-
finishType(interfaceType
|
|
2558
|
+
finishType(interfaceType);
|
|
2550
2559
|
}
|
|
2551
2560
|
if (mapper === undefined) {
|
|
2552
2561
|
(_a = interfaceType.namespace) === null || _a === void 0 ? void 0 : _a.interfaces.set(interfaceType.name, interfaceType);
|
|
@@ -2593,8 +2602,9 @@ export function createChecker(program) {
|
|
|
2593
2602
|
});
|
|
2594
2603
|
unionType.decorators = checkDecorators(unionType, node, mapper);
|
|
2595
2604
|
checkUnionVariants(unionType, node, variants, mapper);
|
|
2605
|
+
linkMapper(unionType, mapper);
|
|
2596
2606
|
if (shouldCreateTypeForTemplate(node, mapper)) {
|
|
2597
|
-
finishType(unionType
|
|
2607
|
+
finishType(unionType);
|
|
2598
2608
|
}
|
|
2599
2609
|
linkType(links, unionType, mapper);
|
|
2600
2610
|
if (mapper === undefined) {
|
|
@@ -2634,8 +2644,9 @@ export function createChecker(program) {
|
|
|
2634
2644
|
union: undefined,
|
|
2635
2645
|
});
|
|
2636
2646
|
variantType.decorators = checkDecorators(variantType, variantNode, mapper);
|
|
2647
|
+
linkMapper(variantType, mapper);
|
|
2637
2648
|
if (shouldCreateTypeForTemplate(variantNode.parent, mapper)) {
|
|
2638
|
-
finishType(variantType
|
|
2649
|
+
finishType(variantType);
|
|
2639
2650
|
}
|
|
2640
2651
|
if (links) {
|
|
2641
2652
|
linkType(links, variantType, mapper);
|
|
@@ -2722,10 +2733,11 @@ export function createChecker(program) {
|
|
|
2722
2733
|
*/
|
|
2723
2734
|
function createType(typeDef) {
|
|
2724
2735
|
Object.setPrototypeOf(typeDef, typePrototype);
|
|
2736
|
+
typeDef.isFinished = false;
|
|
2725
2737
|
return typeDef;
|
|
2726
2738
|
}
|
|
2727
|
-
function finishType(typeDef
|
|
2728
|
-
return finishTypeForProgramAndChecker(program, typePrototype, typeDef
|
|
2739
|
+
function finishType(typeDef) {
|
|
2740
|
+
return finishTypeForProgramAndChecker(program, typePrototype, typeDef);
|
|
2729
2741
|
}
|
|
2730
2742
|
function getLiteralType(node) {
|
|
2731
2743
|
return createLiteralType(node.value, node);
|
|
@@ -4072,21 +4084,24 @@ function countPropertiesInherited(model, filter) {
|
|
|
4072
4084
|
}
|
|
4073
4085
|
return count;
|
|
4074
4086
|
}
|
|
4075
|
-
export function finishTypeForProgram(program, typeDef
|
|
4076
|
-
return finishTypeForProgramAndChecker(program, program.checker.typePrototype, typeDef
|
|
4087
|
+
export function finishTypeForProgram(program, typeDef) {
|
|
4088
|
+
return finishTypeForProgramAndChecker(program, program.checker.typePrototype, typeDef);
|
|
4077
4089
|
}
|
|
4078
|
-
function
|
|
4090
|
+
function linkMapper(typeDef, mapper) {
|
|
4079
4091
|
if (mapper) {
|
|
4080
4092
|
compilerAssert(!typeDef.templateArguments, "Mapper provided but template arguments already set.");
|
|
4081
4093
|
typeDef.templateMapper = mapper;
|
|
4082
4094
|
typeDef.templateArguments = mapper.args;
|
|
4083
4095
|
}
|
|
4096
|
+
}
|
|
4097
|
+
function finishTypeForProgramAndChecker(program, typePrototype, typeDef) {
|
|
4084
4098
|
if ("decorators" in typeDef) {
|
|
4085
4099
|
for (const decApp of typeDef.decorators) {
|
|
4086
4100
|
applyDecoratorToType(program, decApp, typeDef);
|
|
4087
4101
|
}
|
|
4088
4102
|
}
|
|
4089
4103
|
Object.setPrototypeOf(typeDef, typePrototype);
|
|
4104
|
+
typeDef.isFinished = true;
|
|
4090
4105
|
return typeDef;
|
|
4091
4106
|
}
|
|
4092
4107
|
function applyDecoratorToType(program, decApp, target) {
|