FieldLayout
Interface in Reflection
One struct field's byte layout: its name, its DSL type key (the string typeKey returns), and its offset, align and size in bytes under the LayoutKind the enclosing StructLayout was computed with.
import type { FieldLayout } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface FieldLayout { readonly name: string; readonly type: string; readonly offset: number; readonly align: number; readonly size: number;}Description
A packer that writes Float32Array
slots divides offset by 4; every type this engine lays out is at least 4-byte aligned,
so the division is exact.
Instance properties
nameread onlystringtyperead onlystringoffsetread onlynumberalignread onlynumbersizeread onlynumber
See also
Source
src/core/reflect.ts, line 226, at commit 26de7be8