📎아이템 30 문서에 타입 정보를 쓰지 않기
/**
* Returns a string with the foreground color.
* Takes zero or one arguments. With no arguments, returns the
* standard foreground color. With one argument, returns the foreground color
* for a particular page.
*/
function getForegroundColor(page?: string) {
return page === 'login' ? {r: 127, g: 127, b: 127} : {r: 0, g: 0, b: 0};
}/** Get the foreground color for the application or a specific page. */
function getForegroundColor(page?: string): Color {
// ...
}📍 요약
Last updated