Skip to content

๐Ÿ”จ[Refactor] Type ๊ด€๋ฆฌย #24

@widse

Description

@widse

๐Ÿ“ ๋ฆฌํŒฉํ† ๋ง ์„ค๋ช…

export interface PageProperties {
  role?: {
    id: string;
    type: "multi_select";
    multi_select: MultiSelectOption[];
  };
  exposure?: {
    id: string;
    type: "checkbox";
    checkbox: boolean;
  };
  writer?: {
    id: string;
    type: "select";
    select: SelectOption | null;
  };
  status?: {
    id: string;
    type: "status";
    status: SelectOption | null;
  };
  views?: {
    id: string;
    type: "number";
    number: number | null;
  };
  name?: {
    id: string;
    type: "title";
    title: { type: "text"; text: { content: string; link: null } }[];
  };
}

Noition์—์„œ ๋ฐ›์•„์˜ค๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ํ”„๋กœ์ ํŠธ ๋‚ด type์„ ์ •์˜ํ•˜๊ณ  ์‚ฌ์šฉํ• ์ˆ˜ ์žˆ๊ฒŒ ๋งŒ๋“ค์–ด๋‘” interface ์ž…๋‹ˆ๋‹ค.
์œ„ interface์—์„œ ๊ฐ ํ‚ค๋ฅผ undefined๊ฐ€ ๊ฐ€๋Šฅํ•˜๊ฒŒ ์„ค์ •ํ•ด๋‘์—ˆ๋Š”๋ฐ ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ์— ์–ด๋ ค์›€์ด ์žˆ์–ด,
(property) properties: Record<string, DatabasePropertyConfigResponse> ์ด ํƒ€์ž…์„ ํ™•์žฅ ๊ฐ€๋Šฅํ•˜๊ฒŒ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด๋ฉด ์ข‹์„์ง€์— ๋Œ€ํ•ด ์ด์Šˆ ๋‚จ๊น๋‹ˆ๋‹ค.

โœ… TODO

  • ํ•  ์ผ1

๐Ÿ“š ETC

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions