NODE_BRAND
이 페이지에서

NODE_BRAND

상수, IR 분류

The symbol every node carries as a brand, installed once on the ReadonlyNode prototype.

import { NODE_BRAND } from 'typeshade'

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

구문

const NODE_BRAND: typeof NODE_BRAND

설명

The symbol every node carries as a brand, installed once on the ReadonlyNode prototype. It is created with Symbol.for, which resolves through the global symbol registry, so when a bundler loads two copies of this package a node built by one copy still carries the brand the other copy checks for. instanceof Node gives no such guarantee, because prototype identity differs per copy. isNodeValue reads this slot.

함께 보기

소스

src/core/ir/node.ts, 151행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고