createSymbol
Construct a symbol instance and register it with devtools. Prefer this over
calling new directly so that debugging tools can track the symbol.
import { createSymbol } from "@alloy-js/core";
function createSymbol<TSymbol extends OutputSymbol, Args extends unknown[]>(ctor: new (...args: Args) => TSymbol, ...args: Args): TSymbol;Parameters
Section titled “Parameters”| ctor | new (…args: Args) => TSymbol | |
| args | Args |
Returns
Section titled “Returns”TSymbol
Remarks
Section titled “Remarks”Binder registration (via useBinder() + notifySymbolCreated()) happens
inside the OutputSymbol constructor regardless of whether you use
createSymbol or new. This helper only adds devtools registration.