Skip to content

Commit e2c7e4c

Browse files
Upgrade TypeScript to 4.9.4 (#134)
1 parent a4f9fc6 commit e2c7e4c

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"sinon": "^7.2.7",
7979
"size-limit": "^4.5.4",
8080
"ts-node": "^8.1.0",
81-
"typescript": "^3.4.5",
81+
"typescript": "4.9.4",
8282
"webpack": "^4.30.0",
8383
"xo": "^0.24.0"
8484
},
@@ -161,7 +161,7 @@
161161
"size-limit": [
162162
{
163163
"path": "dist/src/index.js",
164-
"limit": "55 KB",
164+
"limit": "65 KB",
165165
"running": false,
166166
"gzip": false
167167
}

src/utils/split-props.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ interface Dictionary<T> {
44
[key: string]: T
55
}
66

7-
export interface SplitProps<P, K extends keyof P> {
7+
export interface SplitProps<P extends Dictionary<any>, K extends keyof P> {
88
matchedProps: Pick<P, K>
99
remainingProps: Omit<P, K>
1010
}
1111

1212
/**
1313
* Utility to split props based on an array of keys
1414
*/
15-
export default function splitProps<P extends Dictionary<any>, K extends keyof P>(props: P, keys: K[]): SplitProps<P, K> {
15+
export default function splitProps<P extends Dictionary<any>, K extends keyof P>(
16+
props: P,
17+
keys: K[]
18+
): SplitProps<P, K> {
1619
const matchedProps = {} as Pick<P, K>
1720
const remainingProps = {} as P
18-
const propKeys= Object.keys(props) as K[]
21+
const propKeys = Object.keys(props) as K[]
1922

2023
for (let i = 0; i < propKeys.length; i++) {
2124
const propKey = propKeys[i]

src/utils/style-sheet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default class CustomStyleSheet {
112112
const sheet = this.getSheet()
113113

114114
// This is the ultrafast version, works across browsers
115-
if (this.isSpeedy && sheet && sheet.insertRule) {
115+
if (this.isSpeedy && sheet != null) {
116116
this._insert(sheet, rule)
117117
} else {
118118
last(this.tags).append(document.createTextNode(rule))

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12966,10 +12966,10 @@ typedarray@^0.0.6:
1296612966
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1296712967
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
1296812968

12969-
typescript@^3.4.5:
12970-
version "3.4.5"
12971-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
12972-
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==
12969+
typescript@4.9.4:
12970+
version "4.9.4"
12971+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
12972+
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
1297312973

1297412974
typescript@^4.0.3:
1297512975
version "4.0.3"

0 commit comments

Comments
 (0)