From cfafeee833c56f551c3a60280a15e8eb63207d2d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:24:51 +0000 Subject: [PATCH 1/5] Initial plan From 26a096b04f2a4acc8d8c4a56ea1393210f8aa0b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:38:02 +0000 Subject: [PATCH 2/5] Expose complete compiler options API Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com> --- packages/typescript/src/api/async/api.ts | 4 +++- .../typescript/src/api/proto.generated.ts | 12 ++++++++++++ packages/typescript/src/api/sync/api.ts | 4 +++- packages/typescript/test/async/api.test.ts | 19 +++++++++++++++++++ packages/typescript/test/sync/api.test.ts | 19 +++++++++++++++++++ tools/gen-proto/main.go | 8 ++++---- tools/gen-proto/main_test.go | 6 ++++++ 7 files changed, 66 insertions(+), 6 deletions(-) diff --git a/packages/typescript/src/api/async/api.ts b/packages/typescript/src/api/async/api.ts index ef6d7fb7ef10b..16eaa43d6d6bb 100644 --- a/packages/typescript/src/api/async/api.ts +++ b/packages/typescript/src/api/async/api.ts @@ -3,7 +3,9 @@ import { CompletionItemKind } from "#enums/completionItemKind"; import { DiagnosticCategory } from "#enums/diagnosticCategory"; import { ElementFlags } from "#enums/elementFlags"; import { EmitOnly } from "#enums/emitOnly"; +import { JsxEmit } from "#enums/jsxEmit"; import { ModuleKind } from "#enums/moduleKind"; +import { ModuleResolutionKind } from "#enums/moduleResolutionKind"; import { NewLineKind } from "#enums/newLineKind"; import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; import { ObjectFlags } from "#enums/objectFlags"; @@ -136,7 +138,7 @@ import type { export { formatDiagnostics, formatDiagnosticsWithColorAndContext } from "../diagnosticFormatter.ts"; export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; -export { CheckFlags, CompletionItemKind, DiagnosticCategory, ElementFlags, EmitOnly, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypeFormatFlags, TypePredicateKind }; +export { CheckFlags, CompletionItemKind, DiagnosticCategory, ElementFlags, EmitOnly, JsxEmit, ModifierFlags, ModuleKind, ModuleResolutionKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypeFormatFlags, TypePredicateKind }; export type { APIImportAdderAction as ImportAdderAction, APIOptions, diff --git a/packages/typescript/src/api/proto.generated.ts b/packages/typescript/src/api/proto.generated.ts index 6528b59b0f3f9..928fb758299b4 100644 --- a/packages/typescript/src/api/proto.generated.ts +++ b/packages/typescript/src/api/proto.generated.ts @@ -1306,6 +1306,18 @@ export interface CompilerOptions { useUnknownInCatchVariables?: boolean; verbatimModuleSyntax?: boolean; maxNodeModuleJsDepth?: number; + /** @deprecated Do not use outside of options parsing and validation. */ + allowSyntheticDefaultImports?: boolean; + /** @deprecated Do not use outside of options parsing and validation. */ + alwaysStrict?: boolean; + /** @deprecated Do not use outside of options parsing and validation. */ + baseUrl?: string; + /** @deprecated Do not use outside of options parsing and validation. */ + downlevelIteration?: boolean; + /** @deprecated Do not use outside of options parsing and validation. */ + esModuleInterop?: boolean; + /** @deprecated Do not use outside of options parsing and validation. */ + outFile?: string; /** Internal fields */ configFilePath?: string; } diff --git a/packages/typescript/src/api/sync/api.ts b/packages/typescript/src/api/sync/api.ts index b92a3fa26fb72..aab90293bddd9 100644 --- a/packages/typescript/src/api/sync/api.ts +++ b/packages/typescript/src/api/sync/api.ts @@ -20,7 +20,9 @@ import { CompletionItemKind } from "#enums/completionItemKind"; import { DiagnosticCategory } from "#enums/diagnosticCategory"; import { ElementFlags } from "#enums/elementFlags"; import { EmitOnly } from "#enums/emitOnly"; +import { JsxEmit } from "#enums/jsxEmit"; import { ModuleKind } from "#enums/moduleKind"; +import { ModuleResolutionKind } from "#enums/moduleResolutionKind"; import { NewLineKind } from "#enums/newLineKind"; import { NodeBuilderFlags } from "#enums/nodeBuilderFlags"; import { ObjectFlags } from "#enums/objectFlags"; @@ -153,7 +155,7 @@ import type { export { formatDiagnostics, formatDiagnosticsWithColorAndContext } from "../diagnosticFormatter.ts"; export { documentURIToFileName, fileNameToDocumentURI } from "../path.ts"; -export { CheckFlags, CompletionItemKind, DiagnosticCategory, ElementFlags, EmitOnly, ModifierFlags, ModuleKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypeFormatFlags, TypePredicateKind }; +export { CheckFlags, CompletionItemKind, DiagnosticCategory, ElementFlags, EmitOnly, JsxEmit, ModifierFlags, ModuleKind, ModuleResolutionKind, NodeBuilderFlags, ObjectFlags, SignatureFlags, SignatureKind, SymbolFlags, TypeFlags, TypeFormatFlags, TypePredicateKind }; export type { APIImportAdderAction as ImportAdderAction, APIOptions, diff --git a/packages/typescript/test/async/api.test.ts b/packages/typescript/test/async/api.test.ts index b40091c90d6c9..669dd23e2c785 100644 --- a/packages/typescript/test/async/api.test.ts +++ b/packages/typescript/test/async/api.test.ts @@ -51,6 +51,7 @@ import { type BigIntLiteralType, CheckFlags, type ConditionalType, + type CompilerOptions, DiagnosticCategory, EmitOnly, type FreshableType, @@ -60,9 +61,11 @@ import { type InterfaceType, type IntrinsicType, isErrorType, + JsxEmit, type LiteralType, ModifierFlags, ModuleKind, + ModuleResolutionKind, ObjectFlags, type Signature, SignatureKind, @@ -95,6 +98,22 @@ import { } from "./api.testUtils.ts"; describe("API", () => { + test("CompilerOptions supports public enums and compatibility options", () => { + const options: CompilerOptions = { + allowSyntheticDefaultImports: true, + esModuleInterop: true, + jsx: JsxEmit.Preserve, + moduleResolution: ModuleResolutionKind.Bundler, + }; + + assert.deepEqual(options, { + allowSyntheticDefaultImports: true, + esModuleInterop: true, + jsx: 1, + moduleResolution: 100, + }); + }); + test("parseCommandLine", async () => { const api = spawnAPI(); try { diff --git a/packages/typescript/test/sync/api.test.ts b/packages/typescript/test/sync/api.test.ts index d534bc20a6e4e..1199e4f8cc573 100644 --- a/packages/typescript/test/sync/api.test.ts +++ b/packages/typescript/test/sync/api.test.ts @@ -60,6 +60,7 @@ import { API, type BigIntLiteralType, CheckFlags, + type CompilerOptions, type ConditionalType, DiagnosticCategory, EmitOnly, @@ -70,9 +71,11 @@ import { type InterfaceType, type IntrinsicType, isErrorType, + JsxEmit, type LiteralType, ModifierFlags, ModuleKind, + ModuleResolutionKind, ObjectFlags, type Signature, SignatureKind, @@ -103,6 +106,22 @@ import { } from "./api.testUtils.ts"; describe("API", () => { + test("CompilerOptions supports public enums and compatibility options", () => { + const options: CompilerOptions = { + allowSyntheticDefaultImports: true, + esModuleInterop: true, + jsx: JsxEmit.Preserve, + moduleResolution: ModuleResolutionKind.Bundler, + }; + + assert.deepEqual(options, { + allowSyntheticDefaultImports: true, + esModuleInterop: true, + jsx: 1, + moduleResolution: 100, + }); + }); + test("parseCommandLine", () => { const api = spawnAPI(); try { diff --git a/tools/gen-proto/main.go b/tools/gen-proto/main.go index 2ae7eaebe1656..b0872eeeaffa1 100644 --- a/tools/gen-proto/main.go +++ b/tools/gen-proto/main.go @@ -565,8 +565,8 @@ func (r *typeRenderer) inlineStruct(structType *types.Struct) string { var fields []string multiline := false for i := range structType.NumFields() { - field, include, optional, nonnil, deprecated, internal := jsonField(structType, i) - if !include || deprecated || internal { + field, include, optional, nonnil, _, internal := jsonField(structType, i) + if !include || internal { continue } fieldType := r.typeString(structType.Field(i).Type(), !optional && !nonnil) @@ -605,8 +605,8 @@ func (r *typeRenderer) declarations() (string, error) { writeDoc(&out, "", r.docs[named.Obj()]) fmt.Fprintf(&out, "export interface %s {\n", exportedName(named.Obj().Name())) for i := range structType.NumFields() { - field, include, optional, nonnil, deprecated, internal := jsonField(structType, i) - if !include || deprecated || internal { + field, include, optional, nonnil, _, internal := jsonField(structType, i) + if !include || internal { continue } fieldType := r.typeString(structType.Field(i).Type(), !optional && !nonnil) diff --git a/tools/gen-proto/main_test.go b/tools/gen-proto/main_test.go index 41990e0f11ea8..91ea67cf4e8d6 100644 --- a/tools/gen-proto/main_test.go +++ b/tools/gen-proto/main_test.go @@ -41,10 +41,16 @@ func TestGenerate(t *testing.T) { `import type { NewLineKind } from "#enums/newLineKind";`, `import type { ScriptTarget } from "#enums/scriptTarget";`, `jsx?: JsxEmit;`, + `allowSyntheticDefaultImports?: boolean;`, + `alwaysStrict?: boolean;`, + `baseUrl?: string;`, + `downlevelIteration?: boolean;`, + `esModuleInterop?: boolean;`, `module?: ModuleKind;`, `moduleResolution?: ModuleResolutionKind;`, `moduleDetection?: ModuleDetectionKind;`, `newLine?: NewLineKind;`, + `outFile?: string;`, `paths?: Record;`, `target?: ScriptTarget;`, `/** InitializeResponse is returned by the initialize method. */ From b11981f2944edad949ff43670992e6d4aba5c74e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 17:49:32 +0000 Subject: [PATCH 3/5] Apply final API test formatting Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com> --- packages/typescript/test/async/api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typescript/test/async/api.test.ts b/packages/typescript/test/async/api.test.ts index 669dd23e2c785..dbd1df22f9e4f 100644 --- a/packages/typescript/test/async/api.test.ts +++ b/packages/typescript/test/async/api.test.ts @@ -50,8 +50,8 @@ import { API, type BigIntLiteralType, CheckFlags, - type ConditionalType, type CompilerOptions, + type ConditionalType, DiagnosticCategory, EmitOnly, type FreshableType, From 561b2d6aa8970ef50e9b848194a21a0d89978193 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 18:11:24 +0000 Subject: [PATCH 4/5] Guarantee generated compiler option exports Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com> --- .../typescript/src/api/proto.generated.ts | 27 +++++++++---------- packages/typescript/test/async/api.test.ts | 19 ------------- packages/typescript/test/sync/api.test.ts | 19 ------------- tools/gen-proto/main.go | 19 ++++++++----- tools/gen-proto/main_test.go | 12 --------- tsc/internal/core/compileroptions.go | 4 +-- 6 files changed, 27 insertions(+), 73 deletions(-) diff --git a/packages/typescript/src/api/proto.generated.ts b/packages/typescript/src/api/proto.generated.ts index 928fb758299b4..0942d93080ccc 100644 --- a/packages/typescript/src/api/proto.generated.ts +++ b/packages/typescript/src/api/proto.generated.ts @@ -1,11 +1,18 @@ // Code generated by gen-proto; DO NOT EDIT. -import type { JsxEmit } from "#enums/jsxEmit"; -import type { ModuleDetectionKind } from "#enums/moduleDetectionKind"; -import type { ModuleKind } from "#enums/moduleKind"; -import type { ModuleResolutionKind } from "#enums/moduleResolutionKind"; -import type { NewLineKind } from "#enums/newLineKind"; -import type { ScriptTarget } from "#enums/scriptTarget"; +import { JsxEmit } from "#enums/jsxEmit"; +import { ModuleDetectionKind } from "#enums/moduleDetectionKind"; +import { ModuleKind } from "#enums/moduleKind"; +import { ModuleResolutionKind } from "#enums/moduleResolutionKind"; +import { NewLineKind } from "#enums/newLineKind"; +import { ScriptTarget } from "#enums/scriptTarget"; + +export { JsxEmit } from "#enums/jsxEmit"; +export { ModuleDetectionKind } from "#enums/moduleDetectionKind"; +export { ModuleKind } from "#enums/moduleKind"; +export { ModuleResolutionKind } from "#enums/moduleResolutionKind"; +export { NewLineKind } from "#enums/newLineKind"; +export { ScriptTarget } from "#enums/scriptTarget"; export type APIMethod = { params: TParams; result: TResult; }; @@ -1309,15 +1316,7 @@ export interface CompilerOptions { /** @deprecated Do not use outside of options parsing and validation. */ allowSyntheticDefaultImports?: boolean; /** @deprecated Do not use outside of options parsing and validation. */ - alwaysStrict?: boolean; - /** @deprecated Do not use outside of options parsing and validation. */ - baseUrl?: string; - /** @deprecated Do not use outside of options parsing and validation. */ - downlevelIteration?: boolean; - /** @deprecated Do not use outside of options parsing and validation. */ esModuleInterop?: boolean; - /** @deprecated Do not use outside of options parsing and validation. */ - outFile?: string; /** Internal fields */ configFilePath?: string; } diff --git a/packages/typescript/test/async/api.test.ts b/packages/typescript/test/async/api.test.ts index dbd1df22f9e4f..b40091c90d6c9 100644 --- a/packages/typescript/test/async/api.test.ts +++ b/packages/typescript/test/async/api.test.ts @@ -50,7 +50,6 @@ import { API, type BigIntLiteralType, CheckFlags, - type CompilerOptions, type ConditionalType, DiagnosticCategory, EmitOnly, @@ -61,11 +60,9 @@ import { type InterfaceType, type IntrinsicType, isErrorType, - JsxEmit, type LiteralType, ModifierFlags, ModuleKind, - ModuleResolutionKind, ObjectFlags, type Signature, SignatureKind, @@ -98,22 +95,6 @@ import { } from "./api.testUtils.ts"; describe("API", () => { - test("CompilerOptions supports public enums and compatibility options", () => { - const options: CompilerOptions = { - allowSyntheticDefaultImports: true, - esModuleInterop: true, - jsx: JsxEmit.Preserve, - moduleResolution: ModuleResolutionKind.Bundler, - }; - - assert.deepEqual(options, { - allowSyntheticDefaultImports: true, - esModuleInterop: true, - jsx: 1, - moduleResolution: 100, - }); - }); - test("parseCommandLine", async () => { const api = spawnAPI(); try { diff --git a/packages/typescript/test/sync/api.test.ts b/packages/typescript/test/sync/api.test.ts index 1199e4f8cc573..d534bc20a6e4e 100644 --- a/packages/typescript/test/sync/api.test.ts +++ b/packages/typescript/test/sync/api.test.ts @@ -60,7 +60,6 @@ import { API, type BigIntLiteralType, CheckFlags, - type CompilerOptions, type ConditionalType, DiagnosticCategory, EmitOnly, @@ -71,11 +70,9 @@ import { type InterfaceType, type IntrinsicType, isErrorType, - JsxEmit, type LiteralType, ModifierFlags, ModuleKind, - ModuleResolutionKind, ObjectFlags, type Signature, SignatureKind, @@ -106,22 +103,6 @@ import { } from "./api.testUtils.ts"; describe("API", () => { - test("CompilerOptions supports public enums and compatibility options", () => { - const options: CompilerOptions = { - allowSyntheticDefaultImports: true, - esModuleInterop: true, - jsx: JsxEmit.Preserve, - moduleResolution: ModuleResolutionKind.Bundler, - }; - - assert.deepEqual(options, { - allowSyntheticDefaultImports: true, - esModuleInterop: true, - jsx: 1, - moduleResolution: 100, - }); - }); - test("parseCommandLine", () => { const api = spawnAPI(); try { diff --git a/tools/gen-proto/main.go b/tools/gen-proto/main.go index b0872eeeaffa1..b3a9eb2745694 100644 --- a/tools/gen-proto/main.go +++ b/tools/gen-proto/main.go @@ -565,8 +565,8 @@ func (r *typeRenderer) inlineStruct(structType *types.Struct) string { var fields []string multiline := false for i := range structType.NumFields() { - field, include, optional, nonnil, _, internal := jsonField(structType, i) - if !include || internal { + field, include, optional, nonnil, deprecated, internal := jsonField(structType, i) + if !include || deprecated || internal { continue } fieldType := r.typeString(structType.Field(i).Type(), !optional && !nonnil) @@ -605,8 +605,8 @@ func (r *typeRenderer) declarations() (string, error) { writeDoc(&out, "", r.docs[named.Obj()]) fmt.Fprintf(&out, "export interface %s {\n", exportedName(named.Obj().Name())) for i := range structType.NumFields() { - field, include, optional, nonnil, _, internal := jsonField(structType, i) - if !include || internal { + field, include, optional, nonnil, deprecated, internal := jsonField(structType, i) + if !include || deprecated || internal { continue } fieldType := r.typeString(structType.Field(i).Type(), !optional && !nonnil) @@ -655,7 +655,11 @@ func (r *typeRenderer) importDeclarations() string { for _, path := range paths { names := r.imports[path] sort.Strings(names) - fmt.Fprintf(&out, "import type { %s } from %q;\n", strings.Join(names, ", "), path) + fmt.Fprintf(&out, "import { %s } from %q;\n", strings.Join(names, ", "), path) + } + out.WriteString("\n") + for _, path := range paths { + fmt.Fprintf(&out, "export { %s } from %q;\n", strings.Join(r.imports[path], ", "), path) } return out.String() } @@ -686,11 +690,12 @@ func jsonField(structType *types.Struct, index int) (name string, include bool, tag := reflect.StructTag(structType.Tag(index)).Get("json") noniltag := reflect.StructTag(structType.Tag(index)).Get("nonnil") deprecatedtag := reflect.StructTag(structType.Tag(index)).Get("deprecated") + apitag := reflect.StructTag(structType.Tag(index)).Get("api") internaltag := reflect.StructTag(structType.Tag(index)).Get("internal") parts := strings.Split(tag, ",") name = parts[0] if name == "-" { - return "", false, false, noniltag == "true", deprecatedtag == "true", internaltag == "true" + return "", false, false, noniltag == "true", deprecatedtag == "true" && apitag != "true", internaltag == "true" } if name == "" { name = field.Name() @@ -700,7 +705,7 @@ func jsonField(structType *types.Struct, index int) (name string, include bool, optional = true } } - return name, true, optional, noniltag == "true", deprecatedtag == "true", internaltag == "true" + return name, true, optional, noniltag == "true", deprecatedtag == "true" && apitag != "true", internaltag == "true" } func exportedName(value string) string { diff --git a/tools/gen-proto/main_test.go b/tools/gen-proto/main_test.go index 91ea67cf4e8d6..12e4876ace63f 100644 --- a/tools/gen-proto/main_test.go +++ b/tools/gen-proto/main_test.go @@ -34,23 +34,11 @@ func TestGenerate(t *testing.T) { `openProjects?: readonly DocumentIdentifier[];`, `snapshot: number;`, `file: DocumentIdentifier;`, - `import type { JsxEmit } from "#enums/jsxEmit";`, - `import type { ModuleDetectionKind } from "#enums/moduleDetectionKind";`, - `import type { ModuleKind } from "#enums/moduleKind";`, - `import type { ModuleResolutionKind } from "#enums/moduleResolutionKind";`, - `import type { NewLineKind } from "#enums/newLineKind";`, - `import type { ScriptTarget } from "#enums/scriptTarget";`, `jsx?: JsxEmit;`, - `allowSyntheticDefaultImports?: boolean;`, - `alwaysStrict?: boolean;`, - `baseUrl?: string;`, - `downlevelIteration?: boolean;`, - `esModuleInterop?: boolean;`, `module?: ModuleKind;`, `moduleResolution?: ModuleResolutionKind;`, `moduleDetection?: ModuleDetectionKind;`, `newLine?: NewLineKind;`, - `outFile?: string;`, `paths?: Record;`, `target?: ScriptTarget;`, `/** InitializeResponse is returned by the initialize method. */ diff --git a/tsc/internal/core/compileroptions.go b/tsc/internal/core/compileroptions.go index 55401a499f3a8..c91a35f42ac6d 100644 --- a/tsc/internal/core/compileroptions.go +++ b/tsc/internal/core/compileroptions.go @@ -119,7 +119,7 @@ type CompilerOptions struct { MaxNodeModuleJsDepth *int `json:"maxNodeModuleJsDepth,omitzero"` // Deprecated: Do not use outside of options parsing and validation. - AllowSyntheticDefaultImports Tristate `json:"allowSyntheticDefaultImports,omitzero" deprecated:"true"` + AllowSyntheticDefaultImports Tristate `json:"allowSyntheticDefaultImports,omitzero" deprecated:"true" api:"true"` // Deprecated: Do not use outside of options parsing and validation. AlwaysStrict Tristate `json:"alwaysStrict,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. @@ -127,7 +127,7 @@ type CompilerOptions struct { // Deprecated: Do not use outside of options parsing and validation. DownlevelIteration Tristate `json:"downlevelIteration,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. - ESModuleInterop Tristate `json:"esModuleInterop,omitzero" deprecated:"true"` + ESModuleInterop Tristate `json:"esModuleInterop,omitzero" deprecated:"true" api:"true"` // Deprecated: Do not use outside of options parsing and validation. OutFile string `json:"outFile,omitzero" deprecated:"true"` From 6621e81afdd888d23dd78e64ae30d5495b049225 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 19:14:42 +0000 Subject: [PATCH 5/5] Stop generating deprecated compiler options Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com> --- packages/typescript/src/api/proto.generated.ts | 4 ---- tools/gen-proto/main.go | 5 ++--- tsc/internal/core/compileroptions.go | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/typescript/src/api/proto.generated.ts b/packages/typescript/src/api/proto.generated.ts index 0942d93080ccc..5c6ab9c905ca4 100644 --- a/packages/typescript/src/api/proto.generated.ts +++ b/packages/typescript/src/api/proto.generated.ts @@ -1313,10 +1313,6 @@ export interface CompilerOptions { useUnknownInCatchVariables?: boolean; verbatimModuleSyntax?: boolean; maxNodeModuleJsDepth?: number; - /** @deprecated Do not use outside of options parsing and validation. */ - allowSyntheticDefaultImports?: boolean; - /** @deprecated Do not use outside of options parsing and validation. */ - esModuleInterop?: boolean; /** Internal fields */ configFilePath?: string; } diff --git a/tools/gen-proto/main.go b/tools/gen-proto/main.go index b3a9eb2745694..ce65bc39772fb 100644 --- a/tools/gen-proto/main.go +++ b/tools/gen-proto/main.go @@ -690,12 +690,11 @@ func jsonField(structType *types.Struct, index int) (name string, include bool, tag := reflect.StructTag(structType.Tag(index)).Get("json") noniltag := reflect.StructTag(structType.Tag(index)).Get("nonnil") deprecatedtag := reflect.StructTag(structType.Tag(index)).Get("deprecated") - apitag := reflect.StructTag(structType.Tag(index)).Get("api") internaltag := reflect.StructTag(structType.Tag(index)).Get("internal") parts := strings.Split(tag, ",") name = parts[0] if name == "-" { - return "", false, false, noniltag == "true", deprecatedtag == "true" && apitag != "true", internaltag == "true" + return "", false, false, noniltag == "true", deprecatedtag == "true", internaltag == "true" } if name == "" { name = field.Name() @@ -705,7 +704,7 @@ func jsonField(structType *types.Struct, index int) (name string, include bool, optional = true } } - return name, true, optional, noniltag == "true", deprecatedtag == "true" && apitag != "true", internaltag == "true" + return name, true, optional, noniltag == "true", deprecatedtag == "true", internaltag == "true" } func exportedName(value string) string { diff --git a/tsc/internal/core/compileroptions.go b/tsc/internal/core/compileroptions.go index c91a35f42ac6d..55401a499f3a8 100644 --- a/tsc/internal/core/compileroptions.go +++ b/tsc/internal/core/compileroptions.go @@ -119,7 +119,7 @@ type CompilerOptions struct { MaxNodeModuleJsDepth *int `json:"maxNodeModuleJsDepth,omitzero"` // Deprecated: Do not use outside of options parsing and validation. - AllowSyntheticDefaultImports Tristate `json:"allowSyntheticDefaultImports,omitzero" deprecated:"true" api:"true"` + AllowSyntheticDefaultImports Tristate `json:"allowSyntheticDefaultImports,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. AlwaysStrict Tristate `json:"alwaysStrict,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. @@ -127,7 +127,7 @@ type CompilerOptions struct { // Deprecated: Do not use outside of options parsing and validation. DownlevelIteration Tristate `json:"downlevelIteration,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. - ESModuleInterop Tristate `json:"esModuleInterop,omitzero" deprecated:"true" api:"true"` + ESModuleInterop Tristate `json:"esModuleInterop,omitzero" deprecated:"true"` // Deprecated: Do not use outside of options parsing and validation. OutFile string `json:"outFile,omitzero" deprecated:"true"`