-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: cc1dc3b someTypeRelatedToType now passes isIntersectionConstituent cf3eadc Merge branch 'master' into fix-missed-intersection-constituent-threading f10fe38 Fix [][] lint
- Loading branch information
Showing
6 changed files
with
176 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/quickIntersectionCheckCorrectlyCachesErrors.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.tsx(10,21): error TS2304: Cannot find name 'React'. | ||
|
||
|
||
==== tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.tsx (1 errors) ==== | ||
interface F<P> { | ||
(props: P & { children?: boolean }): void; | ||
propTypes: { [K in keyof P]: null extends P ? K : K }; | ||
} | ||
declare function g(C: F<unknown>): string; | ||
export function wu<CP extends { o: object }>(CC: F<CP>) { | ||
class WU { | ||
m() { | ||
g(CC) | ||
return <CC {...(null as unknown as CP)} />; | ||
~~ | ||
!!! error TS2304: Cannot find name 'React'. | ||
} | ||
} | ||
} | ||
|
42 changes: 42 additions & 0 deletions
42
tests/baselines/reference/quickIntersectionCheckCorrectlyCachesErrors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//// [quickIntersectionCheckCorrectlyCachesErrors.tsx] | ||
interface F<P> { | ||
(props: P & { children?: boolean }): void; | ||
propTypes: { [K in keyof P]: null extends P ? K : K }; | ||
} | ||
declare function g(C: F<unknown>): string; | ||
export function wu<CP extends { o: object }>(CC: F<CP>) { | ||
class WU { | ||
m() { | ||
g(CC) | ||
return <CC {...(null as unknown as CP)} />; | ||
} | ||
} | ||
} | ||
|
||
|
||
//// [quickIntersectionCheckCorrectlyCachesErrors.js] | ||
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
exports.__esModule = true; | ||
function wu(CC) { | ||
var WU = /** @class */ (function () { | ||
function WU() { | ||
} | ||
WU.prototype.m = function () { | ||
g(CC); | ||
return React.createElement(CC, __assign({}, null)); | ||
}; | ||
return WU; | ||
}()); | ||
} | ||
exports.wu = wu; |
48 changes: 48 additions & 0 deletions
48
tests/baselines/reference/quickIntersectionCheckCorrectlyCachesErrors.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
=== tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.tsx === | ||
interface F<P> { | ||
>F : Symbol(F, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 0)) | ||
>P : Symbol(P, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 12)) | ||
|
||
(props: P & { children?: boolean }): void; | ||
>props : Symbol(props, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 1, 5)) | ||
>P : Symbol(P, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 12)) | ||
>children : Symbol(children, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 1, 17)) | ||
|
||
propTypes: { [K in keyof P]: null extends P ? K : K }; | ||
>propTypes : Symbol(F.propTypes, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 1, 46)) | ||
>K : Symbol(K, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 2, 18)) | ||
>P : Symbol(P, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 12)) | ||
>P : Symbol(P, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 12)) | ||
>K : Symbol(K, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 2, 18)) | ||
>K : Symbol(K, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 2, 18)) | ||
} | ||
declare function g(C: F<unknown>): string; | ||
>g : Symbol(g, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 3, 1)) | ||
>C : Symbol(C, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 4, 19)) | ||
>F : Symbol(F, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 0)) | ||
|
||
export function wu<CP extends { o: object }>(CC: F<CP>) { | ||
>wu : Symbol(wu, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 4, 42)) | ||
>CP : Symbol(CP, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 19)) | ||
>o : Symbol(o, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 31)) | ||
>CC : Symbol(CC, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 45)) | ||
>F : Symbol(F, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 0, 0)) | ||
>CP : Symbol(CP, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 19)) | ||
|
||
class WU { | ||
>WU : Symbol(WU, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 57)) | ||
|
||
m() { | ||
>m : Symbol(WU.m, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 6, 14)) | ||
|
||
g(CC) | ||
>g : Symbol(g, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 3, 1)) | ||
>CC : Symbol(CC, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 45)) | ||
|
||
return <CC {...(null as unknown as CP)} />; | ||
>CC : Symbol(CC, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 45)) | ||
>CP : Symbol(CP, Decl(quickIntersectionCheckCorrectlyCachesErrors.tsx, 5, 19)) | ||
} | ||
} | ||
} | ||
|
41 changes: 41 additions & 0 deletions
41
tests/baselines/reference/quickIntersectionCheckCorrectlyCachesErrors.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
=== tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.tsx === | ||
interface F<P> { | ||
(props: P & { children?: boolean }): void; | ||
>props : P & { children?: boolean; } | ||
>children : boolean | ||
|
||
propTypes: { [K in keyof P]: null extends P ? K : K }; | ||
>propTypes : { [K in keyof P]: null extends P ? K : K; } | ||
>null : null | ||
} | ||
declare function g(C: F<unknown>): string; | ||
>g : (C: F<unknown>) => string | ||
>C : F<unknown> | ||
|
||
export function wu<CP extends { o: object }>(CC: F<CP>) { | ||
>wu : <CP extends { o: object; }>(CC: F<CP>) => void | ||
>o : object | ||
>CC : F<CP> | ||
|
||
class WU { | ||
>WU : WU | ||
|
||
m() { | ||
>m : () => any | ||
|
||
g(CC) | ||
>g(CC) : string | ||
>g : (C: F<unknown>) => string | ||
>CC : F<CP> | ||
|
||
return <CC {...(null as unknown as CP)} />; | ||
><CC {...(null as unknown as CP)} /> : any | ||
>CC : F<CP> | ||
>(null as unknown as CP) : CP | ||
>null as unknown as CP : CP | ||
>null as unknown : unknown | ||
>null : null | ||
} | ||
} | ||
} | ||
|
15 changes: 15 additions & 0 deletions
15
tests/cases/compiler/quickIntersectionCheckCorrectlyCachesErrors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @jsx: react | ||
// @filename: quickIntersectionCheckCorrectlyCachesErrors.tsx | ||
interface F<P> { | ||
(props: P & { children?: boolean }): void; | ||
propTypes: { [K in keyof P]: null extends P ? K : K }; | ||
} | ||
declare function g(C: F<unknown>): string; | ||
export function wu<CP extends { o: object }>(CC: F<CP>) { | ||
class WU { | ||
m() { | ||
g(CC) | ||
return <CC {...(null as unknown as CP)} />; | ||
} | ||
} | ||
} |