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;Parameters
Section titled “Parameters”| name |
|
| options | optional
|
Options
Section titled “Options”| ignoreNameConflict | optionalboolean |
| ignoreNamePolicy | optionalboolean |
Returns
Section titled “Returns”Namekey
Example
Section titled “Example”const myClass = namekey("MyClass");
return <> <ClassDeclaration name={myClass} /> {myClass}</>Renders a class and a reference to that class.