Console Reference: c3Make
Use c3Make to construct a Type instance. The function returns an instance with the supplied values.
Parameters
| Name | Required | Type | Description |
|---|---|---|---|
valueType | ✓ | Type | The C3 Type to be instantiated |
value | ✓ | object | Values to be assigned to the instantiated Type |
Example
The following example creates an instance of a custom Manufacturer Type:
JavaScript
const mfc = c3Make(Manufacturer, { fullName: "Honda", id: "honda-1234" });
mfc.fullName; // "Honda"
mfc.id; // "honda-1234"