PineEditorWorkspaceApi
Integration guide · Reference index
Public contract reference. This declaration describes types and callback shapes; availability is constrained by the linked integration guide and the runtime capability. Legacy product-specific fields are not a promise of implementation.
getSnapshot
getSnapshot(): PineEditorWorkspaceSnapshot;Use the type signature above and the integration guide for the owning capability.
subscribe
subscribe(listener: (change: PineEditorWorkspaceChange) => void): () => void;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
listener | (change: PineEditorWorkspaceChange) => void | Yes |
subscribeLayoutRequests
subscribeLayoutRequests(
listener: (request: PineEditorLayoutRequest) => void,
): () => void;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
listener | (request: PineEditorLayoutRequest) => void | Yes |
previewCompile
previewCompile(source: string): Promise<PineScriptCompileResult>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
source | string | Yes |
replaceSource
replaceSource(
source: string,
expected: { generation: number; sourceHash: string },
): Promise<PineEditorWorkspaceSnapshot>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
source | string | Yes |
expected | { generation: number; sourceHash: string } | Yes |
openEditor
openEditor(): Promise<void>;Use the type signature above and the integration guide for the owning capability.
openStrategyTester
openStrategyTester(): Promise<void>;Use the type signature above and the integration guide for the owning capability.
check
check(): Promise<PineEditorWorkspaceSnapshot>;Use the type signature above and the integration guide for the owning capability.
run
run(): Promise<PineEditorWorkspaceSnapshot>;Use the type signature above and the integration guide for the owning capability.
save
save(title?: string): Promise<PineEditorWorkspaceSnapshot>;Use the type signature above and the integration guide for the owning capability.
| Parameter | Type | Required |
|---|---|---|
title | string | No |
getStrategyReport
getStrategyReport(): PineStrategyReport | null;Use the type signature above and the integration guide for the owning capability.