Skip to content

Commit aef555f

Browse files
committed
Still having TypeScript issue #26395
See microsoft/TypeScript#26395
1 parent 3b9e2ec commit aef555f

File tree

19 files changed

+71
-54
lines changed

19 files changed

+71
-54
lines changed

examples/ClubMembers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626

2727
"devDependencies": {
28-
"typescript": "^2.9.2",
28+
"typescript": "next",
2929

3030
"@types/react": "latest",
3131
"@types/react-dom": "latest",

examples/HTML5Constraints/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919

2020
"devDependencies": {
21-
"typescript": "^2.9.2",
21+
"typescript": "next",
2222

2323
"@types/react": "latest",
2424
"@types/react-dom": "latest",

examples/MaterialUI/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727

2828
"devDependencies": {
29-
"typescript": "^2.9.2",
29+
"typescript": "next",
3030

3131
"@types/react": "latest",
3232
"@types/react-dom": "latest",

examples/NoFramework/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919

2020
"devDependencies": {
21-
"typescript": "^2.9.2",
21+
"typescript": "next",
2222

2323
"@types/react": "latest",
2424
"@types/react-dom": "latest",

examples/Password/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525

2626
"devDependencies": {
27-
"typescript": "^2.9.2",
27+
"typescript": "next",
2828

2929
"@types/react": "latest",
3030
"@types/react-dom": "latest",

examples/PasswordNoState/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121

2222
"devDependencies": {
23-
"typescript": "^2.9.2",
23+
"typescript": "next",
2424

2525
"@types/react": "latest",
2626
"@types/react-dom": "latest",

examples/ReactNative/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535

3636
"devDependencies": {
37-
"typescript": "^2.9.2",
37+
"typescript": "next",
3838

3939
"@types/react": "latest",
4040
"@types/react-native": "latest",

examples/ServerSideRendering/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525

2626
"devDependencies": {
27-
"typescript": "^2.9.2",
27+
"typescript": "next",
2828

2929
"@types/react": "latest",
3030
"@types/react-dom": "latest",

examples/SignUp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030

3131
"devDependencies": {
32-
"typescript": "^2.9.2",
32+
"typescript": "next",
3333

3434
"@types/react": "latest",
3535
"@types/react-dom": "latest",

examples/WizardForm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121

2222
"devDependencies": {
23-
"typescript": "^2.9.2",
23+
"typescript": "next",
2424

2525
"@types/react": "latest",
2626
"@types/react-dom": "latest",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"devDependencies": {
4242
"lerna": "latest",
4343

44-
"typescript": "^2.9.2",
44+
"typescript": "next",
4545

4646
"tslint": "latest",
4747
"tslint-react": "latest"

packages/react-form-with-constraints-bootstrap4/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242

4343
"devDependencies": {
44-
"typescript": "^2.9.2",
44+
"typescript": "next",
4545

4646
"react": "latest",
4747
"@types/react": "latest",

packages/react-form-with-constraints-material-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242

4343
"devDependencies": {
44-
"typescript": "^2.9.2",
44+
"typescript": "next",
4545

4646
"react": "latest",
4747
"@types/react": "latest",

packages/react-form-with-constraints-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939

4040
"devDependencies": {
41-
"typescript": "^2.9.2",
41+
"typescript": "next",
4242

4343
"react": "16.0.0",
4444
"@types/react": "latest",

packages/react-form-with-constraints-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040

4141
"devDependencies": {
42-
"typescript": "^2.9.2",
42+
"typescript": "next",
4343

4444
"react": "latest",
4545
"@types/react": "latest",

packages/react-form-with-constraints/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848

4949
"devDependencies": {
50-
"typescript": "^2.9.2",
50+
"typescript": "next",
5151

5252
"react": "latest",
5353
"@types/react": "latest",

packages/react-form-with-constraints/src/InputElement.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class InputElement {
1717
// HTMLButtonElement, HTMLFieldSetElement, HTMLInputElement, HTMLObjectElement,
1818
// HTMLOutputElement, HTMLSelectElement, HTMLTextAreaElement
1919
// ValidityState is supported by IE >= 10
20-
readonly validity: IValidityState;
20+
readonly validity: ValidityState;
2121
readonly validationMessage: string;
2222

2323
// Need to duplicate the input when the user changes rapidly the input
@@ -30,13 +30,13 @@ export class InputElement {
3030
this.value = input.value;
3131

3232
// Solution 1: no clone, then .mock.calls never ends with ValidityState inside FormWithConstraints.test.tsx in v0.8
33-
//this.validity = input.validity;
33+
this.validity = input.validity;
3434

3535
// Solution 2: JSON does not work to clone ValidityState (results in an empty object)
3636
//this.validity = JSON.parse(JSON.stringify(input.validity));
3737

3838
// Solution 3: manually clone ValidityState
39-
this.validity = new IValidityState(input.validity as ValidityState);
39+
//this.validity = new IValidityState(input.validity as ValidityState);
4040

4141
this.validationMessage = input.validationMessage;
4242
} else {
@@ -53,7 +53,11 @@ export class InputElement {
5353
// Cannot clone ValidityState using JSON.parse(JSON.stringify(input.validity)),
5454
// results in an empty object ({}) under Chrome 66, Firefox 60 and Safari 10.1.2
5555
// so let's manually clone it.
56+
/*
5657
export class IValidityState implements ValidityState {
58+
// FIXME
59+
// See Crash: TypeError: Cannot read property 'kind' of undefined (at isConstraintPosition) https://github.com/Microsoft/TypeScript/issues/26978
60+
5761
readonly badInput: boolean;
5862
readonly customError: boolean;
5963
readonly patternMismatch: boolean;
@@ -80,3 +84,4 @@ export class IValidityState implements ValidityState {
8084
this.valueMissing = validity.valueMissing;
8185
}
8286
}
87+
*/

tsconfig-react-es5.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"moduleResolution": "node",
99
"esModuleInterop": true,
1010
"allowSyntheticDefaultImports": true, // FIXME https://github.com/Microsoft/TypeScript/issues/26193
11-
"noLib": false,
12-
"lib": ["dom.iterable", "es2017"],
11+
"lib": ["dom", "dom.iterable", "es2018"],
1312
"experimentalDecorators": true,
1413
"noUnusedLocals": true,
1514
"noUnusedParameters": true,

yarn.lock

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,8 +2093,8 @@ big.js@^3.1.3:
20932093
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
20942094

20952095
binary-extensions@^1.0.0:
2096-
version "1.11.0"
2097-
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
2096+
version "1.12.0"
2097+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14"
20982098

20992099
bl@^1.0.0:
21002100
version "1.2.2"
@@ -2704,9 +2704,15 @@ columnify@^1.5.4:
27042704
strip-ansi "^3.0.0"
27052705
wcwidth "^1.0.0"
27062706

2707-
[email protected], combined-stream@^1.0.5, combined-stream@~1.0.5, combined-stream@~1.0.6:
2707+
27082708
version "1.0.6"
2709-
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
2709+
resolved "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
2710+
dependencies:
2711+
delayed-stream "~1.0.0"
2712+
2713+
combined-stream@^1.0.5, combined-stream@~1.0.5, combined-stream@~1.0.6:
2714+
version "1.0.7"
2715+
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
27102716
dependencies:
27112717
delayed-stream "~1.0.0"
27122718

@@ -6227,7 +6233,7 @@ libnpmaccess@^3.0.0:
62276233

62286234
load-json-file@^1.0.0:
62296235
version "1.1.0"
6230-
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
6236+
resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
62316237
dependencies:
62326238
graceful-fs "^4.1.2"
62336239
parse-json "^2.2.0"
@@ -6237,7 +6243,7 @@ load-json-file@^1.0.0:
62376243

62386244
load-json-file@^2.0.0:
62396245
version "2.0.0"
6240-
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
6246+
resolved "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8"
62416247
dependencies:
62426248
graceful-fs "^4.1.2"
62436249
parse-json "^2.2.0"
@@ -6764,8 +6770,8 @@ min-document@^2.19.0:
67646770
dom-walk "^0.1.0"
67656771

67666772
mini-css-extract-plugin@latest:
6767-
version "0.4.2"
6768-
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.2.tgz#b3ecc0d6b1bbe5ff14add42b946a7b200cf78651"
6773+
version "0.4.3"
6774+
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.3.tgz#98d60fcc5d228c3e36a9bd15a1d6816d6580beb8"
67696775
dependencies:
67706776
loader-utils "^1.1.0"
67716777
schema-utils "^1.0.0"
@@ -6879,8 +6885,8 @@ mobx-react@latest:
68796885
react-lifecycles-compat "^3.0.2"
68806886

68816887
mobx@latest:
6882-
version "5.1.1"
6883-
resolved "https://registry.yarnpkg.com/mobx/-/mobx-5.1.1.tgz#b8579ea7e7fbb07b79d56a71c3191287afc45f93"
6888+
version "5.1.2"
6889+
resolved "https://registry.yarnpkg.com/mobx/-/mobx-5.1.2.tgz#5a3a0bc381ba155901e33eabe492c3c7482e8b35"
68846890

68856891
modify-values@^1.0.0:
68866892
version "1.0.1"
@@ -8190,13 +8196,13 @@ react-devtools-core@^2.5.0:
81908196
ws "^2.0.3"
81918197

81928198
react-dom@latest:
8193-
version "16.5.1"
8194-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.1.tgz#29d0c5a01ed3b6b4c14309aa91af6ec4eb4f292c"
8199+
version "16.5.2"
8200+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.2.tgz#b69ee47aa20bab5327b2b9d7c1fe2a30f2cfa9d7"
81958201
dependencies:
81968202
loose-envify "^1.1.0"
81978203
object-assign "^4.1.1"
81988204
prop-types "^15.6.2"
8199-
schedule "^0.4.0"
8205+
schedule "^0.5.0"
82008206

82018207
react-event-listener@^0.6.2:
82028208
version "0.6.3"
@@ -8214,9 +8220,9 @@ react-i18next@latest:
82148220
html-parse-stringify2 "2.0.1"
82158221
prop-types "^15.6.0"
82168222

8217-
react-is@^16.4.2, react-is@^16.5.1:
8218-
version "16.5.1"
8219-
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.5.1.tgz#c6e8734fd548a22e1cef4fd0833afbeb433b85ee"
8223+
react-is@^16.4.2, react-is@^16.5.2:
8224+
version "16.5.2"
8225+
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.5.2.tgz#e2a7b7c3f5d48062eb769fcb123505eb928722e3"
82208226

82218227
react-jss@^8.1.0:
82228228
version "8.6.1"
@@ -8304,13 +8310,13 @@ [email protected]:
83048310
object-assign "^4.1.1"
83058311

83068312
react-test-renderer@^16.0.0-0:
8307-
version "16.5.1"
8308-
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.5.1.tgz#17f020fb0cf884cadebb5240d9d9c23452f18299"
8313+
version "16.5.2"
8314+
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.5.2.tgz#92e9d2c6f763b9821b2e0b22f994ee675068b5ae"
83098315
dependencies:
83108316
object-assign "^4.1.1"
83118317
prop-types "^15.6.2"
8312-
react-is "^16.5.1"
8313-
schedule "^0.4.0"
8318+
react-is "^16.5.2"
8319+
schedule "^0.5.0"
83148320

83158321
react-timer-mixin@^0.13.2:
83168322
version "0.13.4"
@@ -8342,13 +8348,13 @@ [email protected]:
83428348
prop-types "^15.6.0"
83438349

83448350
react@latest:
8345-
version "16.5.1"
8346-
resolved "https://registry.yarnpkg.com/react/-/react-16.5.1.tgz#8cb8e9f8cdcb4bde41c9a138bfbf907e66132372"
8351+
version "16.5.2"
8352+
resolved "https://registry.yarnpkg.com/react/-/react-16.5.2.tgz#19f6b444ed139baa45609eee6dc3d318b3895d42"
83478353
dependencies:
83488354
loose-envify "^1.1.0"
83498355
object-assign "^4.1.1"
83508356
prop-types "^15.6.2"
8351-
schedule "^0.4.0"
8357+
schedule "^0.5.0"
83528358

83538359
read-cmd-shim@^1.0.1:
83548360
version "1.0.1"
@@ -8836,7 +8842,7 @@ rollup-plugin-uglify@latest:
88368842
serialize-javascript "^1.5.0"
88378843
uglify-js "^3.4.9"
88388844

8839-
[email protected], rollup-pluginutils@latest:
8845+
88408846
version "2.3.1"
88418847
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz#760d185ccc237dedc12d7ae48c6bcd127b4892d0"
88428848
dependencies:
@@ -8845,11 +8851,18 @@ [email protected], rollup-pluginutils@latest:
88458851

88468852
rollup-pluginutils@^1.3.1:
88478853
version "1.5.2"
8848-
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
8854+
resolved "http://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
88498855
dependencies:
88508856
estree-walker "^0.2.1"
88518857
minimatch "^3.0.2"
88528858

8859+
rollup-pluginutils@latest:
8860+
version "2.3.2"
8861+
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.2.tgz#78d99a0a4baa281c80e23e5d911251ed5ab27d4f"
8862+
dependencies:
8863+
estree-walker "^0.5.2"
8864+
micromatch "^3.1.10"
8865+
88538866
rollup@latest:
88548867
version "0.66.0"
88558868
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.66.0.tgz#697acc008f4b613695b17222c7626affddf4a506"
@@ -8961,9 +8974,9 @@ sax@~1.1.1:
89618974
version "1.1.6"
89628975
resolved "http://registry.npmjs.org/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240"
89638976

8964-
schedule@^0.4.0:
8965-
version "0.4.0"
8966-
resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.4.0.tgz#fa20cfd0bfbf91c47d02272fd7096780d3170bbb"
8977+
schedule@^0.5.0:
8978+
version "0.5.0"
8979+
resolved "https://registry.yarnpkg.com/schedule/-/schedule-0.5.0.tgz#c128fffa0b402488b08b55ae74bb9df55cc29cc8"
89678980
dependencies:
89688981
object-assign "^4.1.1"
89698982

@@ -9936,9 +9949,9 @@ typedarray@^0.0.6:
99369949
version "0.0.6"
99379950
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
99389951

9939-
typescript@^2.9.2:
9940-
version "2.9.2"
9941-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
9952+
typescript@next:
9953+
version "3.1.0-dev.20180918"
9954+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.0-dev.20180918.tgz#17ca3de221cfef96b5e33c5444b0c9ca1d104c02"
99429955

99439956
ua-parser-js@^0.7.18:
99449957
version "0.7.18"
@@ -10300,8 +10313,8 @@ webpack-sources@^1.1.0, webpack-sources@^1.2.0:
1030010313
source-map "~0.6.1"
1030110314

1030210315
webpack@latest:
10303-
version "4.19.0"
10304-
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.19.0.tgz#252296c8af2d21c0994911007defdb3913a7bc66"
10316+
version "4.19.1"
10317+
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.19.1.tgz#096674bc3b573f8756c762754366e5b333d6576f"
1030510318
dependencies:
1030610319
"@webassemblyjs/ast" "1.7.6"
1030710320
"@webassemblyjs/helper-module-context" "1.7.6"

0 commit comments

Comments
 (0)