組み込み関数(record)
type SmallRecord = Record< "a"|"b"|"c" , string >
const small: SmallRecord {
a : string,
b : string,
c : string
}
ある型の中の型を使う
- 定義
export type PageType = {
id: string;
cover: FileType | null;
// properties: Record<string, any>;
properties: PropertyType;
};
- 使用
型PageType
の中のcover
を使いたい。
export const getCover = (cover: PageType["cover"]) => {};