Skip to content

namekey

Create a namekey with the given name. The namekey is a unique refkey that represents a single symbol with the given name and the provided naming-related options.

import { namekey } from "@alloy-js/core";
function namekey(name: string, options?: NamekeyOptions): Namekey;
namestring
optionsoptional NamekeyOptions
ignoreNameConflictoptional boolean
ignoreNamePolicyoptional boolean
Namekey
const myClass = namekey("MyClass");

return <>
  <ClassDeclaration name={myClass} />
  {myClass}
</>

Renders a class and a reference to that class.