File: reverseMappedTypeQuickInfo.ts

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (36 lines) | stat: -rw-r--r-- 881 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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: string;
    };
}`);
verify.quickInfoAt("2", `(property) test_inner: string`);