git clone git@github.com:shaunluttin/typescript-library-unknown-older-targets.git
cd library-ts3.5
npm install
npm run build
cd ../consumer-ts2.0
npm install
npm run build // Good! There is no error because unknown is an alias for any.
cd ../consumer-ts3.1
npm install
npm run build // Good! There is an error because unknown is not assignable to number.
-
Notifications
You must be signed in to change notification settings - Fork 0
shaunluttin/typescript-library-unknown-older-targets
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Demo of how to support `unknown` in older versions of TypeScript.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published