-
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.
Use elipses for reverse mapped types in nested positions (#28494)
- Loading branch information
Showing
3 changed files
with
79 additions
and
31 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
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
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,36 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////interface IAction { | ||
//// type: string; | ||
////} | ||
//// | ||
////type Reducer<S> = (state: S, action: IAction) => S | ||
//// | ||
////function combineReducers<S>(reducers: { [K in keyof S]: Reducer<S[K]> }): Reducer<S> { | ||
//// const dummy = {} as S; | ||
//// return () => dummy; | ||
////} | ||
//// | ||
////const test_inner = (test: string, action: IAction) => { | ||
//// return 'dummy'; | ||
////} | ||
////const test = combineReducers({ | ||
//// test_inner | ||
////}); | ||
//// | ||
////const test_outer = combineReducers({ | ||
//// test | ||
////}); | ||
//// | ||
////// '{test: { test_inner: any } }' | ||
////type FinalType/*1*/ = ReturnType<typeof test_outer>; | ||
//// | ||
////var k: FinalType; | ||
////k.test.test_inner/*2*/ | ||
|
||
verify.quickInfoAt("1", `type FinalType = { | ||
test: { | ||
test_inner: ...; | ||
}; | ||
}`); | ||
verify.quickInfoAt("2", `(property) test_inner: string`); |