JSClassBuilder<T>.DefineClass method
Creates a class definition for the built class.
C#
public JSValue DefineClass(JSValue? baseClass = default)
parameter | description |
---|---|
baseClass | Optional base class for the defined class. If a base class is specified, the constructor callback must also invoke the base class constructor. |
Return Value
The class object (constructor).
Exceptions
exception | condition |
---|---|
InvalidOperationException | A constructor was not provided. |
See Also
- struct JSValue
- class JSClassBuilder<T>
- namespace Microsoft.JavaScript.NodeApi.Interop