-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-extractor] Support new TS .d.json.ts declaration pattern #4899
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
TS 5.x started to support new
moduleResolution
bundler
andnodenext
(ornode16
) which changes the behaviour of TS declaration files for arbitrary extensions like.json
and.css
.By enabling the TS allowArbitraryExtensions setting, declaration files can be imported but are required to follow the
{file basename}.d.{extension}.ts
pattern which is not supported yet by API-Extractor.Repro steps
moduleResolution
tobundler
andallowArbitraryExtensions
totrue
in thetsconfig.json
file..json.d.ts
file extensions in the repo to.d.json.ts
Expected result:
API extractor to not throw warnings or errors
Actual result:
API extractor shows a
ae-wrong-input-file-type
warning for the files with.d.json.ts
extension.Details
This can likely be fixed by updating the below regex with the new pattern.
rushstack/apps/api-extractor/src/api/ExtractorConfig.ts
Line 240 in de9aa4a
(unrelated to API extractor, but I also suspect the
heft-sass-plugin
is impacted since it generatescss.d.ts
files)Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?The text was updated successfully, but these errors were encountered: