Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export const generateExtension = task({
const enumDefs = [
{ name: "SymbolFlags", goPrefix: "SymbolFlags", goFile: "tsc/internal/ast/symbolflags.go", outDir: "packages/typescript/src/enums" },
{ name: "CheckFlags", goPrefix: "CheckFlags", goFile: "tsc/internal/ast/checkflags.go", outDir: "packages/typescript/src/enums" },
{ name: "TypeFlags", goPrefix: "TypeFlags", goFile: "tsc/internal/checker/types.go", outDir: "packages/typescript/src/enums" },
{ name: "TypeFlags", goPrefix: "TypeFlags", goFile: "tsc/internal/checker/types.go", outDir: "packages/typescript/src/enums", excludeMembers: ["Reserved1", "Reserved2", "Reserved3", "IncludesConstrainedTypeVariable", "IncludesError", "IncludesNegated"] },
{ name: "ObjectFlags", goPrefix: "ObjectFlags", goFile: "tsc/internal/checker/types.go", outDir: "packages/typescript/src/enums" },
{ name: "SignatureFlags", goPrefix: "SignatureFlags", goFile: "tsc/internal/checker/types.go", outDir: "packages/typescript/src/enums" },
{ name: "SignatureKind", goPrefix: "SignatureKind", goFile: "tsc/internal/checker/types.go", outDir: "packages/typescript/src/enums" },
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/src/api/node/encoder.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function getNodeCommonData(node: Node): number {
case SyntaxKind.ObjectLiteralExpression:
return ((node as ObjectLiteralExpression).multiLine ? 1 : 0) << 24;
case SyntaxKind.TypeOperator:
return ((node as TypeOperatorNode).operator === SyntaxKind.ReadonlyKeyword ? 1 : (node as TypeOperatorNode).operator === SyntaxKind.UniqueKeyword ? 2 : 0) << 24;
return ((node as TypeOperatorNode).operator === SyntaxKind.ReadonlyKeyword ? 1 : (node as TypeOperatorNode).operator === SyntaxKind.UniqueKeyword ? 2 : (node as TypeOperatorNode).operator === SyntaxKind.NotKeyword ? 3 : 0) << 24;
case SyntaxKind.ImportAttributes:
return ((node as ImportAttributes).multiLine ? 1 : 0) << 24 | ((node as ImportAttributes).token === SyntaxKind.AssertKeyword ? 1 : 0) << 25;
case SyntaxKind.JsxText:
Expand Down
1 change: 1 addition & 0 deletions packages/typescript/src/api/node/node.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ export class RemoteNode extends RemoteNodeBase implements Node {
const idx = (this.data >> 24) & 0x3;
if (idx === 1) return SyntaxKind.ReadonlyKeyword;
if (idx === 2) return SyntaxKind.UniqueKeyword;
if (idx === 3) return SyntaxKind.NotKeyword;
return SyntaxKind.KeyOfKeyword;
}
}
Expand Down
4 changes: 3 additions & 1 deletion packages/typescript/src/ast/ast.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export type KeywordSyntaxKind =
| SyntaxKind.ModuleKeyword
| SyntaxKind.NamespaceKeyword
| SyntaxKind.NeverKeyword
| SyntaxKind.NotKeyword
| SyntaxKind.OutKeyword
| SyntaxKind.ReadonlyKeyword
| SyntaxKind.RequireKeyword
Expand Down Expand Up @@ -311,6 +312,7 @@ export type TokenSyntaxKind =
| SyntaxKind.ModuleKeyword
| SyntaxKind.NamespaceKeyword
| SyntaxKind.NeverKeyword
| SyntaxKind.NotKeyword
| SyntaxKind.OutKeyword
| SyntaxKind.ReadonlyKeyword
| SyntaxKind.RequireKeyword
Expand Down Expand Up @@ -962,7 +964,7 @@ export interface ConditionalTypeNode extends TypeNodeBase {
}
export interface TypeOperatorNode extends TypeNodeBase {
readonly kind: SyntaxKind.TypeOperator;
readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword;
readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.NotKeyword;
readonly type: TypeNode;
}
export interface InferTypeNode extends TypeNodeBase {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript/src/ast/factory.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,7 @@ export function createConditionalTypeNode(checkType: TypeNode, extendsType: Type
}) as unknown as ConditionalTypeNode;
}

export function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode {
export function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.NotKeyword, type: TypeNode): TypeOperatorNode {
return new NodeObject(SyntaxKind.TypeOperator, {
operator,
type,
Expand Down
1 change: 1 addition & 0 deletions packages/typescript/src/enums/objectFlags.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ export enum ObjectFlags {
IsNeverIntersectionComputed = 1 << 25,
IsNeverIntersection = 1 << 26,
IsConstrainedTypeVariable = 1 << 27,
FreshNegated = 1 << 25,
}
1 change: 1 addition & 0 deletions packages/typescript/src/enums/objectFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ export var ObjectFlags: any;
ObjectFlags[ObjectFlags["IsNeverIntersectionComputed"] = 33554432] = "IsNeverIntersectionComputed";
ObjectFlags[ObjectFlags["IsNeverIntersection"] = 67108864] = "IsNeverIntersection";
ObjectFlags[ObjectFlags["IsConstrainedTypeVariable"] = 134217728] = "IsConstrainedTypeVariable";
ObjectFlags[ObjectFlags["FreshNegated"] = 33554432] = "FreshNegated";
})(ObjectFlags || (ObjectFlags = {}));
Loading
Loading