diff --git a/app/plugin/CustomSectionAPI.ts b/app/plugin/CustomSectionAPI.ts index 6fe30bf3..591b4422 100644 --- a/app/plugin/CustomSectionAPI.ts +++ b/app/plugin/CustomSectionAPI.ts @@ -34,6 +34,10 @@ export interface ColumnToMap { strictType?: boolean, } +/** + * Tells Grist what columns a Custom Widget expects and allows users to map between existing column names + * and those requested by the Custom Widget. + */ export type ColumnsToMap = (string|ColumnToMap)[]; /** @@ -78,6 +82,9 @@ export interface WidgetColumnMap { [key: string]: string|string[]|null } +/** + * Interface for the mapping of a custom widget. + */ export interface CustomSectionAPI { /** * Initial request from a Custom Widget that wants to declare its requirements. diff --git a/app/plugin/GristAPI.ts b/app/plugin/GristAPI.ts index 8962ea11..056b9ae0 100644 --- a/app/plugin/GristAPI.ts +++ b/app/plugin/GristAPI.ts @@ -113,7 +113,7 @@ export interface GristDocAPI { listTables(): Promise; /** - * Returns a complete table of data as [[RowRecords]], including the + * Returns a complete table of data as [[GristData.RowRecords]], including the * 'id' column. Do not modify the returned arrays in-place, especially if used * directly (not over RPC). */ diff --git a/app/plugin/grist-plugin-api.ts b/app/plugin/grist-plugin-api.ts index 8712417a..ce1981a0 100644 --- a/app/plugin/grist-plugin-api.ts +++ b/app/plugin/grist-plugin-api.ts @@ -52,10 +52,11 @@ export const rpc: Rpc = new Rpc({logger: createRpcLogger()}); export const api = rpc.getStub(RPC_GRISTAPI_INTERFACE, checkers.GristAPI); export const coreDocApi = rpc.getStub('GristDocAPI@grist', checkers.GristDocAPI); +const viewApiStub = rpc.getStub('GristView', checkers.GristView); + /** * Interface for the records backing a custom widget. */ -const viewApiStub = rpc.getStub('GristView', checkers.GristView); export const viewApi: GristView = { ...viewApiStub, // Decoded objects aren't fully preserved over the RPC channel, so decoding has to happen on this side.