Skip to content

fix: import with file extensions#42

Open
achingbrain wants to merge 2 commits into
bbc:masterfrom
achingbrain:fix/import-with-extensions
Open

fix: import with file extensions#42
achingbrain wants to merge 2 commits into
bbc:masterfrom
achingbrain:fix/import-with-extensions

Conversation

@achingbrain
Copy link
Copy Markdown

Recent versions of TypeScript don't implicitly add .js onto file imports so it's necssary to specify them.

Fixes tsc errors like the below when types from this module are referenced using typescript@6+

src/document-check.js:77:81 - error TS7006: Parameter 'code' implicitly has an 'any' type.

77                   const diagnosticCodes = result.error?.diagnosticCodes?.filter(code => !TS_ERRORS_TO_SUPPRESS.includes(code))

Recent versions of TypeScript don't implicitly add `.js` onto file
imports so it's necssary to specify them.

Fixes `tsc` errors like the below when types from this module are
referenced using `typescript@6`+

```
src/document-check.js:77:81 - error TS7006: Parameter 'code' implicitly has an 'any' type.

77                   const diagnosticCodes = result.error?.diagnosticCodes?.filter(code => !TS_ERRORS_TO_SUPPRESS.includes(code))
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant