Open2
実装Memo(TypeScript)
型を組み合わせる
interface SomeProps {
some: string;
other: number;
};
function OfficeSection({
some,
other,
additional,
}: SomeProps & { additional: boolean }): ReactElement {
return (
<> ... </>
);
}
read only
as const
と宣言するとread onlyとして扱われる
const someThing = {
name: "John",
age: 35
} as const;