-
Notifications
You must be signed in to change notification settings - Fork 1k
[all] Add explicit "types" to tsconfig #4025
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
Conversation
π¦ Changeset detectedLatest commit: 2d57aa6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
π Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultslit-element-list
render
update
update-reflect
lit-html-kitchen-sink
render
update
nop-update
lit-html-repeat
render
update
lit-html-template-heavy
render
update
reactive-element-list
render
update
update-reflect
|
AndrewJakubowicz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Just a question on the usage of skipLibCheck. Thank you!
| } | ||
| ] | ||
| ], | ||
| "types": ["mocha"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are explicit types required on starter packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might not be needed when it's cloned to its own template repo but it's needed for the build and test to run within the monorepo.
packages/localize-tools/testdata/build-runtime-xliff-ph/goldens/tsconfig.json
Show resolved
Hide resolved
packages/localize-tools/testdata/build-runtime-xliff-ph/input/tsconfig.json
Show resolved
Hide resolved
packages/localize-tools/testdata/build-runtime-xliff/input/tsconfig.json
Show resolved
Hide resolved
packages/localize-tools/testdata/extract-xlb-fresh/goldens/tsconfig.json
Show resolved
Hide resolved
AndrewJakubowicz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm β noticed that all skipLibCheck was in testdata directories.
I like this change!
|
The original commit was cherry-picked from when I was testing in the React update branch, adding configs until build and test scripts were passing. But I figured if we're going this route we should add this to every |
Split out from #4000 (comment)
The problem with a monorepo using npm workspaces is that all shared node_modules are hoisted to the monorepo root, including any
@types/packages. Some of these types packages can have global declarations that conflict with another package's, or get included in compiled output unnecessarily.In the PR linked above, I found that
@types/reactaddsTrustedHTMLinterface to the global which was conflicting with@types/trusted-typesand also ends up adding itself as a reference to the.d.tsfile whereTrustedHTMLis used, for example,lit-html.d.ts.Setting https://www.typescriptlang.org/tsconfig#types makes it explicit which global types are used and included. This does not affect types of any packages that are imported, only those added implicitly by their global usage.