Skip to content

Commit

Permalink
chore: update to TypeScript@4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 23, 2020
1 parent ff2b65c commit d3b9a30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion e2e/runJest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export const runContinuous = function (
},

async waitUntil(fn: ConditionFunction) {
await new Promise(resolve => {
await new Promise<void>(resolve => {
const check = (state: StdErrAndOutString) => {
if (fn(state)) {
pending.delete(check);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-haste-map/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ class HasteMap extends EventEmitter {

return Promise.all(
this._watchers.map(
watcher => new Promise(resolve => watcher.close(resolve)),
watcher => new Promise<void>(resolve => watcher.close(resolve)),
),
).then(() => {
this._watchers = [];
Expand Down
4 changes: 2 additions & 2 deletions packages/pretty-format/src/plugins/ReactElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

// Given element.props.children, or subtree during recursive traversal,
// return flattened array of children.
const getChildren = (arg: Array<unknown>, children = []) => {
const getChildren = (arg: unknown, children: Array<unknown> = []) => {
if (Array.isArray(arg)) {
arg.forEach(item => {
getChildren(item, children);
Expand Down Expand Up @@ -115,7 +115,7 @@ export const serialize: NewPlugin['serialize'] = (
);

export const test: NewPlugin['test'] = (val: unknown) =>
val && ReactIs.isElement(val);
val != null && ReactIs.isElement(val);

const plugin: NewPlugin = {serialize, test};

Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19457,22 +19457,22 @@ fsevents@~2.1.2:
linkType: hard

"typescript@*, typescript@^4.0.2, typescript@^4.0.3":
version: 4.0.5
resolution: "typescript@npm:4.0.5"
version: 4.1.2
resolution: "typescript@npm:4.1.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ce94d4bbb914cc9d6fbd42e1476ab18c3292b262b8ba7ba76cd167a858545207a604e75bf1efbb75b8654c8f85deaa19795c3ef00098d7612855139b4ecc0240
checksum: d2ac373b469e973448c7287d0fbc732dbd34d00d07911b9506bbf81469a80db6613361fc9293d021da357cb7c7da2ee32f56d8ef76446361231374200cd6aee9
languageName: node
linkType: hard

"typescript@patch:typescript@*#builtin<compat/typescript>, typescript@patch:typescript@^4.0.2#builtin<compat/typescript>, typescript@patch:typescript@^4.0.3#builtin<compat/typescript>":
version: 4.0.5
resolution: "typescript@patch:typescript@npm%3A4.0.5#builtin<compat/typescript>::version=4.0.5&hash=cc6730"
version: 4.1.2
resolution: "typescript@patch:typescript@npm%3A4.1.2#builtin<compat/typescript>::version=4.1.2&hash=cc6730"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ada6fea7657a51d1b842682d31233e53a3cf509b0edbd6288fda3cfd01643d0190b7ea77837527c4d282c90e61690e19dbfd91be6913e7e7292aa0b588d3506c
checksum: 001ab09bb8f597aab1ec43476aedb91b5d547749219273c232bf34cf5a2209d18fa782e64475755115f0907598bb9b503f5e1c0fed06c3651cac584fc88a8172
languageName: node
linkType: hard

Expand Down

0 comments on commit d3b9a30

Please sign in to comment.