From 18db7d06f4eac91913f943a9123d6a7ffbea3ac4 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Mon, 20 Mar 2023 13:35:12 +0000 Subject: [PATCH 1/2] allow api-extractor to read .d.cts or .d.mts files --- apps/api-extractor/src/api/ExtractorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api-extractor/src/api/ExtractorConfig.ts b/apps/api-extractor/src/api/ExtractorConfig.ts index 95d5542df99..e772db04044 100644 --- a/apps/api-extractor/src/api/ExtractorConfig.ts +++ b/apps/api-extractor/src/api/ExtractorConfig.ts @@ -210,7 +210,7 @@ export class ExtractorConfig { path.join(__dirname, '../schemas/api-extractor-defaults.json') ); - private static readonly _declarationFileExtensionRegExp: RegExp = /\.d\.ts$/i; + private static readonly _declarationFileExtensionRegExp: RegExp = /\.d\.(c|m)?ts$/i; /** {@inheritDoc IConfigFile.projectFolder} */ public readonly projectFolder: string; From 620f1daebbc7998fd8ffc0f7c5e5f378ef711ad0 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Mon, 20 Mar 2023 14:36:48 +0000 Subject: [PATCH 2/2] add change entry --- .../api-extractor/main_2023-03-20-14-36.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@microsoft/api-extractor/main_2023-03-20-14-36.json diff --git a/common/changes/@microsoft/api-extractor/main_2023-03-20-14-36.json b/common/changes/@microsoft/api-extractor/main_2023-03-20-14-36.json new file mode 100644 index 00000000000..49ee142c6f1 --- /dev/null +++ b/common/changes/@microsoft/api-extractor/main_2023-03-20-14-36.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/api-extractor", + "comment": "Add api-extractor support for .d.mts and .d.cts files", + "type": "patch" + } + ], + "packageName": "@microsoft/api-extractor" +} \ No newline at end of file