UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

112 lines (51 loc) 1.47 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [SharedArray](./rc-js-util.sharedarray.md) &gt; [createOne](./rc-js-util.sharedarray.createone.md) ## SharedArray.createOne() method **Signature:** ```typescript static createOne<TCtor extends TTypedArrayCtor>(wrapper: IEmscriptenWrapper<ISharedArrayBindings>, containerType: TCtor, bindToReference: IManagedResourceNode | null, length: number, clearMemory?: boolean): SharedArray<TCtor>; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> wrapper </td><td> [IEmscriptenWrapper](./rc-js-util.iemscriptenwrapper.md)<!-- -->&lt;[ISharedArrayBindings](./rc-js-util.isharedarraybindings.md)<!-- -->&gt; </td><td> </td></tr> <tr><td> containerType </td><td> TCtor </td><td> </td></tr> <tr><td> bindToReference </td><td> [IManagedResourceNode](./rc-js-util.imanagedresourcenode.md) \| null </td><td> </td></tr> <tr><td> length </td><td> number </td><td> </td></tr> <tr><td> clearMemory </td><td> boolean </td><td> _(Optional)_ </td></tr> </tbody></table> **Returns:** [SharedArray](./rc-js-util.sharedarray.md)<!-- -->&lt;TCtor&gt; ## Exceptions exception if allocation cannot be performed.