-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
feat: remove top-level typescript import statements #1259
Merged
johnnyreilly
merged 4 commits into
TypeStrong:master
from
ulivz:feat/make-typescript-as-dev-dependencies
Mar 28, 2021
Merged
feat: remove top-level typescript import statements #1259
johnnyreilly
merged 4 commits into
TypeStrong:master
from
ulivz:feat/make-typescript-as-dev-dependencies
Mar 28, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulivz
force-pushed
the
feat/make-typescript-as-dev-dependencies
branch
from
March 2, 2021 09:17
b987712
to
4a9d33c
Compare
ulivz
changed the title
feat: typescript as dev dependencies
feat: remove top-level typescript import declaration
Mar 2, 2021
ulivz
force-pushed
the
feat/make-typescript-as-dev-dependencies
branch
from
March 2, 2021 09:23
4a9d33c
to
23b75fe
Compare
ulivz
changed the title
feat: remove top-level typescript import declaration
feat: remove top-level typescript import declarations
Mar 2, 2021
ulivz
force-pushed
the
feat/make-typescript-as-dev-dependencies
branch
from
March 2, 2021 09:24
23b75fe
to
62ece47
Compare
ulivz
changed the title
feat: remove top-level typescript import declarations
feat: remove top-level typescript import statements
Mar 2, 2021
ulivz
force-pushed
the
feat/make-typescript-as-dev-dependencies
branch
from
March 2, 2021 09:32
62ece47
to
36bad2e
Compare
@johnnyreilly Could you help review this pull request? Thanks |
Sorry about the delay - have been busy. I like this change. Thanks for raising it. I've just hit the update branch button. Please could you increment the version in the |
Let's 🚢 |
gasnier
added a commit
to gasnier/ts-loader
that referenced
this pull request
Mar 28, 2021
feat: remove top-level typescript import statements (TypeStrong#1259)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
In some deployment systems, the builder and source code are placed in different paths, and we also expect the typescript's version to be completely controlled by the user, if the builder does not depend on
typescript
, then we will get error containingcannot found "typescript"
caused by the top-level typescript import statement atts-loader
, In other words, we SHOULD respect the resolved compiler.Prior to TypeScript 3.8, you can import a type using import. With TypeScript 3.8, you can import a type using the import statement, or using
import type
, and import type is always guaranteed to be removed from your JavaScript, this project has stopped testing TypeScript 3.6 and 3.7 at 953358e, so usage ofimport type
is allowed here.This pull request replaced all remove top-level typescript
import
statements withimport type
, and leverage constants from resolved compiler.