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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
=== tests/cases/compiler/templateLiteralIntersection4.ts ===
type StateHook<S> = () => [S, unknown];
>StateHook : Symbol(StateHook, Decl(templateLiteralIntersection4.ts, 0, 0))
>S : Symbol(S, Decl(templateLiteralIntersection4.ts, 0, 15))
>S : Symbol(S, Decl(templateLiteralIntersection4.ts, 0, 15))
type StoreUtils<Store extends { [K: string]: any }> = Omit<{
>StoreUtils : Symbol(StoreUtils, Decl(templateLiteralIntersection4.ts, 0, 39))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 2, 16))
>K : Symbol(K, Decl(templateLiteralIntersection4.ts, 2, 33))
>Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
[K in keyof Store as `use${Capitalize<string & K>}`]: StateHook<Store[K]>
>K : Symbol(K, Decl(templateLiteralIntersection4.ts, 3, 5))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 2, 16))
>Capitalize : Symbol(Capitalize, Decl(lib.es5.d.ts, --, --))
>K : Symbol(K, Decl(templateLiteralIntersection4.ts, 3, 5))
>StateHook : Symbol(StateHook, Decl(templateLiteralIntersection4.ts, 0, 0))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 2, 16))
>K : Symbol(K, Decl(templateLiteralIntersection4.ts, 3, 5))
}, 'useStore'> & {
Provider: unknown,
>Provider : Symbol(Provider, Decl(templateLiteralIntersection4.ts, 4, 18))
useStore: StateHook<Store>
>useStore : Symbol(useStore, Decl(templateLiteralIntersection4.ts, 5, 20))
>StateHook : Symbol(StateHook, Decl(templateLiteralIntersection4.ts, 0, 0))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 2, 16))
};
declare function createStore<Store extends { [K: string]: any }>(store: Store): StoreUtils<Store>;
>createStore : Symbol(createStore, Decl(templateLiteralIntersection4.ts, 7, 2))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 9, 29))
>K : Symbol(K, Decl(templateLiteralIntersection4.ts, 9, 46))
>store : Symbol(store, Decl(templateLiteralIntersection4.ts, 9, 65))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 9, 29))
>StoreUtils : Symbol(StoreUtils, Decl(templateLiteralIntersection4.ts, 0, 39))
>Store : Symbol(Store, Decl(templateLiteralIntersection4.ts, 9, 29))
const { Provider, useUsername, useAge, useStore } = createStore({
>Provider : Symbol(Provider, Decl(templateLiteralIntersection4.ts, 11, 7))
>useUsername : Symbol(useUsername, Decl(templateLiteralIntersection4.ts, 11, 17))
>useAge : Symbol(useAge, Decl(templateLiteralIntersection4.ts, 11, 30))
>useStore : Symbol(useStore, Decl(templateLiteralIntersection4.ts, 11, 38))
>createStore : Symbol(createStore, Decl(templateLiteralIntersection4.ts, 7, 2))
username: "Aral",
>username : Symbol(username, Decl(templateLiteralIntersection4.ts, 11, 65))
age: 31
>age : Symbol(age, Decl(templateLiteralIntersection4.ts, 12, 19))
});
|