Skip to content

JSClassBuilder<T>.DefineClass method ​

Creates a class definition for the built class.

C#
public JSValue DefineClass(JSValue? baseClass = default)
parameterdescription
baseClassOptional 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 ​

exceptioncondition
InvalidOperationExceptionA constructor was not provided.

See Also ​

Released under the MIT license