API reference / @jsprismarine/script-host / shape/binding
shape/binding
Classes
Interfaces
HostInstance
Defined in: script-host/src/shape/binding.ts:23
What the host gave an instance it made, which every call of the instance's members receives.
Properties
state
readonlystate:string
Defined in: script-host/src/shape/binding.ts:27
The instance's ScriptCall.state, or an empty string when it has none.
tag
readonlytag:number
Defined in: script-host/src/shape/binding.ts:25
The instance's ScriptCall.tag.
ScriptApiContextOptions
Defined in: script-host/src/shape/binding.ts:31
How a ScriptApiContext binds.
Properties
histories?
readonlyoptionalhistories?:Readonly<Record<string,ModuleHistory>>
Defined in: script-host/src/shape/binding.ts:42
The histories a module's dependencies resolve against. The generated ones when absent.
implementations
readonlyimplementations:ScriptApiImplementations
Defined in: script-host/src/shape/binding.ts:39
logger
readonlylogger:ScriptApiLogger
Defined in: script-host/src/shape/binding.ts:40
pack
readonlypack:string
Defined in: script-host/src/shape/binding.ts:33
The pack whose scripts the context serves, as BDS's log names it, such as my pack - 1.0.0.
packId?
readonlyoptionalpackId?:string
Defined in: script-host/src/shape/binding.ts:38
A stable identity for the pack, which two packs with one display name do not share. The engine's context id serves when the caller has one.
privilege?
readonlyoptionalprivilege?: () =>Privilege
Defined in: script-host/src/shape/binding.ts:47
The privilege the script running now has. A member whose metadata does not list it throws BDS's error before its implementation runs. default when absent.
Returns
ScriptApiLogger
Defined in: script-host/src/shape/binding.ts:18
Where the binding reports a member a pack used that has no implementation.
Methods
warn()
warn(
message):void
Defined in: script-host/src/shape/binding.ts:19
Parameters
message
string
Returns
void