Inflearn Community Q&A
문제를 한번 풀어보았습니다.
Resolved
Written on
·
219
0
import { Equal, Expect } from "./helper";
export const fakeDataDefaults = {
foo: "bar",
bar: 123,
baz: true,
};
type objType = typeof fakeDataDefaults;
export type FooType = objType["foo"];
export type BarType = objType["bar"];
export type BazType = objType["baz"];
type tests = [
Expect<Equal<FooType, string>>,
Expect<Equal<BarType, number>>,
Expect<Equal<BazType, boolean>>
];
typescript





