-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #58083 (Don't propagate partial union/inter...) into releas…
…e-5.4 (#58136) Co-authored-by: Anders Hejlsberg <[email protected]>
- Loading branch information
1 parent
38a7c05
commit 892936f
Showing
2 changed files
with
50 additions
and
3 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
45 changes: 45 additions & 0 deletions
45
tests/cases/fourslash/partialUnionPropertyCacheInconsistentErrors.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,45 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @strict: true | ||
// @lib: esnext | ||
|
||
//// interface ComponentOptions<Props> { | ||
//// setup?: (props: Props) => void; | ||
//// name?: string; | ||
//// } | ||
//// | ||
//// interface FunctionalComponent<P> { | ||
//// (props: P): void; | ||
//// } | ||
//// | ||
//// type ConcreteComponent<Props> = | ||
//// | ComponentOptions<Props> | ||
//// | FunctionalComponent<Props>; | ||
//// | ||
//// type Component<Props = {}> = ConcreteComponent<Props>; | ||
//// | ||
//// type WithInstallPlugin = { _prefix?: string }; | ||
//// | ||
//// | ||
//// /**/ | ||
//// export function withInstall<C extends Component, T extends WithInstallPlugin>( | ||
//// component: C | C[], | ||
//// target?: T, | ||
//// ): string { | ||
//// const componentWithInstall = (target ?? component) as T; | ||
//// const components = Array.isArray(component) ? component : [component]; | ||
//// | ||
//// const { name } = components[0]; | ||
//// if (name) { | ||
//// return name; | ||
//// } | ||
//// | ||
//// return ""; | ||
//// } | ||
|
||
verify.noErrors(); | ||
|
||
goTo.marker(); | ||
edit.insert("type C = Component['name']"); | ||
|
||
verify.noErrors(); |