Documentation / @finchart/core / StyleSpec
Type Alias: StyleSpec<S>
StyleSpec<
S> = { readonly [K in keyof S]: NonNullable<S[K]> extends number | string ? StyleVar<NonNullable<S[K]>> : StyleSpec<NonNullable<S[K]>> }
Defined in: packages/core/src/render/style-spec.ts:37
스타일 타입 → 그것을 만드는 선언. 잎은 StyleVar, 가지는 다시 스펙이다.
homomorphic이라 원래 optionality가 보존된다 — 필수 필드는 스펙에서도 필수고, dashArray?처럼 없을 수 있는 자리만 스펙에서 뺄 수 있다.
스펙 상수는 :가 아니라 satisfies로 적는다 — 어노테이션하면 typeof가 이 넓은 타입으로 뭉개져 StyleOverridesOf의 유도가 무력해진다.
Type Parameters
S
S