From c33d5be6a51ed84f63bd57f5a93284e46ed72e87 Mon Sep 17 00:00:00 2001 From: Ian Clanton-Thuon Date: Sun, 25 Aug 2024 20:28:28 -0400 Subject: [PATCH 1/2] Add an option to generate a doc comment on the value. --- .../config/heft.json | 7 ++- .../src/chunks/chunkWithStrings.ts | 2 +- .../localization-plugin-test-02/src/indexA.ts | 8 +-- .../localization-plugin-test-02/src/indexB.ts | 6 +- ...s-export-doc-comment_2024-08-26-00-26.json | 10 ++++ ...s-export-doc-comment_2024-08-26-00-28.json | 10 ++++ ...s-export-doc-comment_2024-08-26-00-26.json | 10 ++++ ...s-export-doc-comment_2024-08-26-00-28.json | 10 ++++ ...s-export-doc-comment_2024-08-26-00-26.json | 10 ++++ ...s-export-doc-comment_2024-08-26-00-28.json | 10 ++++ common/reviews/api/typings-generator.api.md | 3 + .../heft-plugin.json | 2 +- .../src/schemas/options.schema.json | 12 +++- .../src/TypingsGenerator.ts | 4 +- .../src/StringValuesTypingsGenerator.ts | 57 +++++++++++++++---- .../test/StringValuesTypingsGenerator.test.ts | 35 +++++++++--- .../StringValuesTypingsGenerator.test.ts.snap | 47 ++++++++++++++- 17 files changed, 209 insertions(+), 34 deletions(-) create mode 100644 common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-26.json create mode 100644 common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-28.json create mode 100644 common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-26.json create mode 100644 common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-28.json create mode 100644 common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-26.json create mode 100644 common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-28.json diff --git a/build-tests/localization-plugin-test-02/config/heft.json b/build-tests/localization-plugin-test-02/config/heft.json index 057ddf4fdde..f89ba3be2a6 100644 --- a/build-tests/localization-plugin-test-02/config/heft.json +++ b/build-tests/localization-plugin-test-02/config/heft.json @@ -14,7 +14,12 @@ "taskPlugin": { "pluginPackage": "@rushstack/heft-localization-typings-plugin", "options": { - "generatedTsFolder": "temp/loc-json-ts" + "generatedTsFolder": "temp/loc-json-ts", + "exportAsDefault": { + "interfaceDocumentationComment": "This interface represents a JSON object that has been loaded from a localization file.", + "valueDocumentationComment": "@public", + "inferInterfaceNameFromFilename": true + } } } }, diff --git a/build-tests/localization-plugin-test-02/src/chunks/chunkWithStrings.ts b/build-tests/localization-plugin-test-02/src/chunks/chunkWithStrings.ts index 87c09c23463..d9c1f02ae47 100644 --- a/build-tests/localization-plugin-test-02/src/chunks/chunkWithStrings.ts +++ b/build-tests/localization-plugin-test-02/src/chunks/chunkWithStrings.ts @@ -1,6 +1,6 @@ import * as lodash from 'lodash'; -import * as strings from './strings2.loc.json'; +import strings from './strings2.loc.json'; export class ChunkWithStringsClass { public doStuff(): void { diff --git a/build-tests/localization-plugin-test-02/src/indexA.ts b/build-tests/localization-plugin-test-02/src/indexA.ts index 0f291375341..a2bde6dd626 100644 --- a/build-tests/localization-plugin-test-02/src/indexA.ts +++ b/build-tests/localization-plugin-test-02/src/indexA.ts @@ -1,8 +1,8 @@ -import { string1 } from './strings1.loc.json'; -import * as strings3 from './strings3.resjson'; -import * as strings5 from './strings5.resx'; +import strings1 from './strings1.loc.json'; +import strings3 from './strings3.resjson'; +import strings5 from './strings5.resx'; -console.log(string1); +console.log(strings1.string1); console.log(strings3.string2); /*! Preserved comment */ diff --git a/build-tests/localization-plugin-test-02/src/indexB.ts b/build-tests/localization-plugin-test-02/src/indexB.ts index 3bb70cfd44d..57eaba6e06f 100644 --- a/build-tests/localization-plugin-test-02/src/indexB.ts +++ b/build-tests/localization-plugin-test-02/src/indexB.ts @@ -1,7 +1,7 @@ -import { string1, string2 } from './strings3.resjson'; +import strings3 from './strings3.resjson'; const strings4: string = require('./strings4.loc.json'); -console.log(string1); -console.log(string2); +console.log(strings3.string1); +console.log(strings3.string2); console.log(strings4); diff --git a/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-26.json b/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-26.json new file mode 100644 index 00000000000..7575cd41cbe --- /dev/null +++ b/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-localization-typings-plugin", + "comment": "Add a `valueDocumentationComment` option to `exportAsDefault` that allows a documentation comment to be generated for the exported value.", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-localization-typings-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-28.json b/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-28.json new file mode 100644 index 00000000000..6a271a24591 --- /dev/null +++ b/common/changes/@rushstack/heft-localization-typings-plugin/loc-typings-export-doc-comment_2024-08-26-00-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/heft-localization-typings-plugin", + "comment": "Rename the `documentationComment` property in the `exportAsDefault` value to `interfaceDocumentationComment`.", + "type": "minor" + } + ], + "packageName": "@rushstack/heft-localization-typings-plugin" +} \ No newline at end of file diff --git a/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-26.json b/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-26.json new file mode 100644 index 00000000000..18742433069 --- /dev/null +++ b/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/localization-utilities", + "comment": "Add a `valueDocumentationComment` option to `exportAsDefault` that allows a documentation comment to be generated for the exported value.", + "type": "minor" + } + ], + "packageName": "@rushstack/localization-utilities" +} \ No newline at end of file diff --git a/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-28.json b/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-28.json new file mode 100644 index 00000000000..a0b07b54437 --- /dev/null +++ b/common/changes/@rushstack/localization-utilities/loc-typings-export-doc-comment_2024-08-26-00-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/localization-utilities", + "comment": "Rename the `documentationComment` property in the `exportAsDefault` value to `interfaceDocumentationComment`.", + "type": "minor" + } + ], + "packageName": "@rushstack/localization-utilities" +} \ No newline at end of file diff --git a/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-26.json b/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-26.json new file mode 100644 index 00000000000..177a9192b84 --- /dev/null +++ b/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/typings-generator", + "comment": "Add a `valueDocumentationComment` option to `exportAsDefault` that allows a documentation comment to be generated for the exported value.", + "type": "minor" + } + ], + "packageName": "@rushstack/typings-generator" +} \ No newline at end of file diff --git a/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-28.json b/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-28.json new file mode 100644 index 00000000000..a4b7255cfa0 --- /dev/null +++ b/common/changes/@rushstack/typings-generator/loc-typings-export-doc-comment_2024-08-26-00-28.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@rushstack/typings-generator", + "comment": "Rename the `documentationComment` property in the `exportAsDefault` value to `interfaceDocumentationComment`.", + "type": "minor" + } + ], + "packageName": "@rushstack/typings-generator" +} \ No newline at end of file diff --git a/common/reviews/api/typings-generator.api.md b/common/reviews/api/typings-generator.api.md index 44bd4d5c7c4..a942f38b474 100644 --- a/common/reviews/api/typings-generator.api.md +++ b/common/reviews/api/typings-generator.api.md @@ -8,8 +8,11 @@ import { ITerminal } from '@rushstack/terminal'; // @public (undocumented) export interface IExportAsDefaultOptions { + // @deprecated (undocumented) documentationComment?: string; + interfaceDocumentationComment?: string; interfaceName?: string; + valueDocumentationComment?: string; } // @public (undocumented) diff --git a/heft-plugins/heft-localization-typings-plugin/heft-plugin.json b/heft-plugins/heft-localization-typings-plugin/heft-plugin.json index e523631a154..f4a6d738ecf 100644 --- a/heft-plugins/heft-localization-typings-plugin/heft-plugin.json +++ b/heft-plugins/heft-localization-typings-plugin/heft-plugin.json @@ -1,5 +1,5 @@ { - "$schema": "https://developer.microsoft.com/json-schemas/heft/heft-plugin.schema.json", + "$schema": "https://developer.microsoft.com/json-schemas/heft/v0/heft-plugin.schema.json", "taskPlugins": [ { diff --git a/heft-plugins/heft-localization-typings-plugin/src/schemas/options.schema.json b/heft-plugins/heft-localization-typings-plugin/src/schemas/options.schema.json index 5467ae8afdf..ed2c06a2dc0 100644 --- a/heft-plugins/heft-localization-typings-plugin/src/schemas/options.schema.json +++ b/heft-plugins/heft-localization-typings-plugin/src/schemas/options.schema.json @@ -13,10 +13,14 @@ "type": "object", "additionalProperties": false, "properties": { - "documentationComment": { + "interfaceDocumentationComment": { "type": "string", "description": "This value is placed in a documentation comment for the exported default interface." }, + "valueDocumentationComment": { + "type": "string", + "description": "This value is placed in a documentation comment for the exported value." + }, "interfaceName": { "type": "string", "description": "The interface name for the default wrapped export. Defaults to \"IExport\"" @@ -27,10 +31,14 @@ "type": "object", "additionalProperties": false, "properties": { - "documentationComment": { + "interfaceDocumentationComment": { "type": "string", "description": "This value is placed in a documentation comment for the exported default interface." }, + "valueDocumentationComment": { + "type": "string", + "description": "This value is placed in a documentation comment for the exported value." + }, "inferInterfaceNameFromFilename": { "type": "boolean", "description": "When set to true, the default export interface name will be inferred from the filename. This takes precedence over the interfaceName option." diff --git a/libraries/localization-utilities/src/TypingsGenerator.ts b/libraries/localization-utilities/src/TypingsGenerator.ts index a680a0cb812..13abf13a863 100644 --- a/libraries/localization-utilities/src/TypingsGenerator.ts +++ b/libraries/localization-utilities/src/TypingsGenerator.ts @@ -82,8 +82,8 @@ export class TypingsGenerator extends StringValuesTypingsGenerator { const typings: IStringValueTyping[] = []; // eslint-disable-next-line guard-for-in - for (const stringName in locFileData) { - let comment: string | undefined = locFileData[stringName].comment; + for (const [stringName, value] of Object.entries(locFileData)) { + let comment: string | undefined = value.comment; if (processComment) { comment = processComment(comment, relativeFilePath, stringName); } diff --git a/libraries/typings-generator/src/StringValuesTypingsGenerator.ts b/libraries/typings-generator/src/StringValuesTypingsGenerator.ts index a9775dd0d9b..d23aaa5404b 100644 --- a/libraries/typings-generator/src/StringValuesTypingsGenerator.ts +++ b/libraries/typings-generator/src/StringValuesTypingsGenerator.ts @@ -42,11 +42,22 @@ export interface IExportAsDefaultOptions { */ interfaceName?: string; + /** + * @deprecated - Use {@link IExportAsDefaultOptions.interfaceDocumentationComment} instead. + */ + documentationComment?: string; + /** * This value is placed in a documentation comment for the * exported default interface. */ - documentationComment?: string; + interfaceDocumentationComment?: string; + + /** + * This value is placed in a documentation comment for the + * exported const value. + */ + valueDocumentationComment?: string; } /** @@ -93,11 +104,15 @@ function convertToTypingsGeneratorOptions( exportAsDefaultInterfaceName: exportAsDefaultInterfaceName_deprecated, parseAndGenerateTypings } = options; - let defaultSplitExportAsDefaultDocumentationComment: string[] | undefined; + let defaultSplitExportAsDefaultInterfaceDocumentationComment: string[] | undefined; + let defaultSplitExportAsDefaultValueDocumentationComment: string[] | undefined; let defaultExportAsDefaultInterfaceName: string | undefined; if (typeof exportAsDefaultOptions === 'object') { - defaultSplitExportAsDefaultDocumentationComment = Text.splitByNewLines( - exportAsDefaultOptions.documentationComment + defaultSplitExportAsDefaultInterfaceDocumentationComment = Text.splitByNewLines( + exportAsDefaultOptions.interfaceDocumentationComment ?? exportAsDefaultOptions.documentationComment + ); + defaultSplitExportAsDefaultValueDocumentationComment = Text.splitByNewLines( + exportAsDefaultOptions.valueDocumentationComment ); defaultExportAsDefaultInterfaceName = exportAsDefaultOptions.interfaceName ?? @@ -126,21 +141,34 @@ function convertToTypingsGeneratorOptions( const { exportAsDefault: exportAsDefaultOptionsOverride, typings } = stringValueTypings; let exportAsDefaultInterfaceName: string | undefined; let interfaceDocumentationCommentLines: string[] | undefined; + let valueDocumentationCommentLines: string[] | undefined; if (typeof exportAsDefaultOptionsOverride === 'boolean') { if (exportAsDefaultOptionsOverride) { exportAsDefaultInterfaceName = defaultExportAsDefaultInterfaceName ?? EXPORT_AS_DEFAULT_INTERFACE_NAME; - interfaceDocumentationCommentLines = defaultSplitExportAsDefaultDocumentationComment; + interfaceDocumentationCommentLines = defaultSplitExportAsDefaultInterfaceDocumentationComment; + valueDocumentationCommentLines = defaultSplitExportAsDefaultValueDocumentationComment; } } else if (exportAsDefaultOptionsOverride) { - const { interfaceName, documentationComment } = exportAsDefaultOptionsOverride; + const { + interfaceName, + documentationComment, + interfaceDocumentationComment, + valueDocumentationComment + } = exportAsDefaultOptionsOverride; exportAsDefaultInterfaceName = interfaceName ?? defaultExportAsDefaultInterfaceName ?? EXPORT_AS_DEFAULT_INTERFACE_NAME; interfaceDocumentationCommentLines = - Text.splitByNewLines(documentationComment) ?? defaultSplitExportAsDefaultDocumentationComment; + Text.splitByNewLines(interfaceDocumentationComment) ?? + Text.splitByNewLines(documentationComment) ?? + defaultSplitExportAsDefaultInterfaceDocumentationComment; + valueDocumentationCommentLines = + Text.splitByNewLines(valueDocumentationComment) ?? + defaultSplitExportAsDefaultValueDocumentationComment; } else { exportAsDefaultInterfaceName = defaultExportAsDefaultInterfaceName; - interfaceDocumentationCommentLines = defaultSplitExportAsDefaultDocumentationComment; + interfaceDocumentationCommentLines = defaultSplitExportAsDefaultInterfaceDocumentationComment; + valueDocumentationCommentLines = defaultSplitExportAsDefaultValueDocumentationComment; } const outputLines: string[] = []; @@ -174,9 +202,18 @@ function convertToTypingsGeneratorOptions( } if (exportAsDefaultInterfaceName) { + outputLines.push('}', ''); + + if (valueDocumentationCommentLines) { + outputLines.push(`/**`); + for (const line of valueDocumentationCommentLines) { + outputLines.push(` * ${line}`); + } + + outputLines.push(` */`); + } + outputLines.push( - '}', - '', `declare const strings: ${exportAsDefaultInterfaceName};`, '', 'export default strings;' diff --git a/libraries/typings-generator/src/test/StringValuesTypingsGenerator.test.ts b/libraries/typings-generator/src/test/StringValuesTypingsGenerator.test.ts index b6f0dfbf105..2a0b4f79237 100644 --- a/libraries/typings-generator/src/test/StringValuesTypingsGenerator.test.ts +++ b/libraries/typings-generator/src/test/StringValuesTypingsGenerator.test.ts @@ -122,10 +122,20 @@ describe('StringValuesTypingsGenerator', () => { }); }); - describe("with { exportAsDefault: { documentationComment: 'doc-comment\\nsecond line' } }", () => { + describe("with { exportAsDefault: documentationComment: 'deprecated', interfaceDocumentationComment: 'doc-comment' }", () => { runTests({ exportAsDefault: { - documentationComment: 'doc-comment\nsecond line' + documentationComment: 'deprecated', + interfaceDocumentationComment: 'doc-comment' + } + }); + }); + + describe("with { exportAsDefault: { *DocumentationComment: 'doc-comment\\nsecond line' } }", () => { + runTests({ + exportAsDefault: { + interfaceDocumentationComment: 'doc-comment\nsecond line', + valueDocumentationComment: 'value-comment\nsecond line' } }); }); @@ -157,7 +167,8 @@ describe('StringValuesTypingsGenerator', () => { {}, { exportAsDefault: { - documentationComment: 'doc-comment\nsecond line' + interfaceDocumentationComment: 'doc-comment\nsecond line', + valueDocumentationComment: 'value-comment\nsecond line' } } ); @@ -196,7 +207,8 @@ describe('StringValuesTypingsGenerator', () => { }, { exportAsDefault: { - documentationComment: 'doc-comment\nsecond line' + interfaceDocumentationComment: 'doc-comment\nsecond line', + valueDocumentationComment: 'value-comment\nsecond line' } } ); @@ -235,7 +247,8 @@ describe('StringValuesTypingsGenerator', () => { }, { exportAsDefault: { - documentationComment: 'doc-comment\nsecond line' + interfaceDocumentationComment: 'doc-comment\nsecond line', + valueDocumentationComment: 'value-comment\nsecond line' } } ); @@ -248,7 +261,8 @@ describe('StringValuesTypingsGenerator', () => { { exportAsDefault: { interfaceName: 'IBase', - documentationComment: 'base-comment' + interfaceDocumentationComment: 'base-comment', + valueDocumentationComment: 'base-value-comment' } }, { @@ -262,7 +276,8 @@ describe('StringValuesTypingsGenerator', () => { { exportAsDefault: { interfaceName: 'IBase', - documentationComment: 'base-comment' + interfaceDocumentationComment: 'base-comment', + valueDocumentationComment: 'base-value-comment' } }, { @@ -278,12 +293,14 @@ describe('StringValuesTypingsGenerator', () => { { exportAsDefault: { interfaceName: 'IBase', - documentationComment: 'base-comment' + interfaceDocumentationComment: 'base-comment', + valueDocumentationComment: 'base-value-comment' } }, { exportAsDefault: { - documentationComment: 'doc-comment\nsecond line' + interfaceDocumentationComment: 'doc-comment\nsecond line', + valueDocumentationComment: 'value-comment\nsecond line' } } ); diff --git a/libraries/typings-generator/src/test/__snapshots__/StringValuesTypingsGenerator.test.ts.snap b/libraries/typings-generator/src/test/__snapshots__/StringValuesTypingsGenerator.test.ts.snap index 04dc2be464b..796d6ef18cc 100644 --- a/libraries/typings-generator/src/test/__snapshots__/StringValuesTypingsGenerator.test.ts.snap +++ b/libraries/typings-generator/src/test/__snapshots__/StringValuesTypingsGenerator.test.ts.snap @@ -29,6 +29,9 @@ second line } +/** + * base-value-comment + */ declare const strings: IOverride; export default strings;", @@ -52,6 +55,10 @@ second line } +/** + * value-comment + * second line + */ declare const strings: IBase; export default strings;", @@ -107,6 +114,10 @@ second line } +/** + * value-comment + * second line + */ declare const strings: IExport; export default strings;", @@ -162,6 +173,10 @@ second line } +/** + * value-comment + * second line + */ declare const strings: IExport; export default strings;", @@ -217,13 +232,17 @@ second line } +/** + * value-comment + * second line + */ declare const strings: IExport; export default strings;", } `; -exports[`StringValuesTypingsGenerator default exports with { exportAsDefault: { documentationComment: 'doc-comment\\nsecond line' } } should generate typings 1`] = ` +exports[`StringValuesTypingsGenerator default exports with { exportAsDefault: { *DocumentationComment: 'doc-comment\\nsecond line' } } should generate typings 1`] = ` Object { "/out/test.ext.d.ts": "// This file was generated by a tool. Modifying it will produce unexpected behavior @@ -240,6 +259,10 @@ second line } +/** + * value-comment + * second line + */ declare const strings: IExport; export default strings;", @@ -284,6 +307,28 @@ export default strings;", } `; +exports[`StringValuesTypingsGenerator default exports with { exportAsDefault: documentationComment: 'deprecated', interfaceDocumentationComment: 'doc-comment' } should generate typings 1`] = ` +Object { + "/out/test.ext.d.ts": "// This file was generated by a tool. Modifying it will produce unexpected behavior + +/** + * doc-comment + */ +export interface IExport { + /** + * test comment +second line + */ + 'test': string; + +} + +declare const strings: IExport; + +export default strings;", +} +`; + exports[`StringValuesTypingsGenerator default exports with { exportAsDefault: true } should generate typings 1`] = ` Object { "/out/test.ext.d.ts": "// This file was generated by a tool. Modifying it will produce unexpected behavior From 5996d6c765423b3be339f7b375323718dfda89a8 Mon Sep 17 00:00:00 2001 From: Ian Clanton-Thuon Date: Sun, 25 Aug 2024 18:31:18 -0700 Subject: [PATCH 2/2] fixup! Add an option to generate a doc comment on the value. --- .../src/StringValuesTypingsGenerator.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libraries/typings-generator/src/StringValuesTypingsGenerator.ts b/libraries/typings-generator/src/StringValuesTypingsGenerator.ts index d23aaa5404b..f69482a9524 100644 --- a/libraries/typings-generator/src/StringValuesTypingsGenerator.ts +++ b/libraries/typings-generator/src/StringValuesTypingsGenerator.ts @@ -108,16 +108,18 @@ function convertToTypingsGeneratorOptions( let defaultSplitExportAsDefaultValueDocumentationComment: string[] | undefined; let defaultExportAsDefaultInterfaceName: string | undefined; if (typeof exportAsDefaultOptions === 'object') { + const { + interfaceDocumentationComment, + documentationComment: interfaceDocumentationComment_deprecated, + valueDocumentationComment, + interfaceName + } = exportAsDefaultOptions; defaultSplitExportAsDefaultInterfaceDocumentationComment = Text.splitByNewLines( - exportAsDefaultOptions.interfaceDocumentationComment ?? exportAsDefaultOptions.documentationComment - ); - defaultSplitExportAsDefaultValueDocumentationComment = Text.splitByNewLines( - exportAsDefaultOptions.valueDocumentationComment + interfaceDocumentationComment ?? interfaceDocumentationComment_deprecated ); + defaultSplitExportAsDefaultValueDocumentationComment = Text.splitByNewLines(valueDocumentationComment); defaultExportAsDefaultInterfaceName = - exportAsDefaultOptions.interfaceName ?? - exportAsDefaultInterfaceName_deprecated ?? - EXPORT_AS_DEFAULT_INTERFACE_NAME; + interfaceName ?? exportAsDefaultInterfaceName_deprecated ?? EXPORT_AS_DEFAULT_INTERFACE_NAME; } else if (exportAsDefaultOptions) { defaultExportAsDefaultInterfaceName = exportAsDefaultInterfaceName_deprecated ?? EXPORT_AS_DEFAULT_INTERFACE_NAME;