TypeScript「Recursive processing if children are a in parent」parentの中にchildrenがあったらさらに再帰処理
type is here.
type Group = {
id: number;
value: string;
parentId: number;
children: Group[];
type is here.
type Group = {
id: number;
value: string;
parentId: number;
children: Group[];
from
const Contents = (props: ContentsProps) => {
return (
<div key={props.title}>
{props.contents.map( // here!!!
地味に記事がなかったので
type Obj = {
name: string
age: number
}
npx @manifoldco/swagger-to-ts swagger.yml --wrapper "declare namespace API" --output schema.d.ts