FieldLayout
이 페이지에서

FieldLayout

인터페이스, 리플렉션 분류

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'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface FieldLayout {
readonly name: string;
readonly type: string;
readonly offset: number;
readonly align: number;
readonly size: number;
}

설명

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.

인스턴스 속성

name읽기 전용 string
type읽기 전용 string
offset읽기 전용 number
align읽기 전용 number
size읽기 전용 number

함께 보기

소스

src/core/reflect.ts, 226행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고