Skip to content

Commit

Permalink
make this package a polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
gcanti committed Oct 30, 2018
1 parent 2227add commit bf0ba45
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

> **Tags:**
>
> - [New Feature]
> - [Bug Fix]
> - [Breaking Change]
Expand All @@ -12,3 +13,6 @@
**Note**: Gaps between patch versions are faulty/broken releases.
**Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice.

# 0.1.0

Initial release
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
An alias of unknown that works with legacy typescript versions (before 3.1)
A polyfill of `unknown` that works with legacy typescript versions (before 3.0)

```ts
export type mixed = { [key: string]: any } | object | number | string | boolean | symbol | undefined | null | void

declare global {
type unknown = mixed
}
```
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
{
"name": "unknown-ts",
"version": "0.0.2",
"description": "An alias of unknown that works with legacy typescript versions (before 3.1)",
"version": "0.1.0",
"description": "A polyfill of unknown that works with legacy typescript versions (before 3.0)",
"files": [
"lib",
"typesVersions"
"lib"
],
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"typesVersions": {
">=3.1": {
"*": [
"typesVersions/3.1.x/index.d.ts"
]
}
},
"scripts": {
"lint": "tslint -p tsconfig.json src/**/*.ts",
"prettier": "prettier --no-semi --single-quote --print-width 120 --parser typescript --list-different \"{src,test}/**/*.ts\"",
Expand All @@ -37,8 +29,16 @@
"rimraf": "^2.6.2",
"tslint": "^5.9.1",
"tslint-config-standard": "^7.0.0",
"typescript": "^3.1.3"
"typescript": "^2.9.2"
},
"tags": [],
"keywords": []
"tags": [
"typescript",
"unknown",
"polyfill"
],
"keywords": [
"typescript",
"unknown",
"polyfill"
]
}
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export type mixed = { [key: string]: any } | object | number | string | boolean | symbol | undefined | null | void

declare global {
type unknown = mixed
}
1 change: 0 additions & 1 deletion typesVersions/3.1.x/index.d.ts

This file was deleted.

0 comments on commit bf0ba45

Please sign in to comment.