@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
32 lines (31 loc) • 1.72 kB
TypeScript
import { ArcadeApiContext } from '@arcgis/arcade-languageservice';
import { ApiSnippet } from '@arcgis/languages-api-utils';
import { Uri } from 'monaco-editor';
import { IEditorProfileDefinition, IPredefinedProfile } from '../profile/types';
import { LanguageDefaultsBase } from '../language-defaults-base';
declare class ArcadeLanguageServiceDefaults extends LanguageDefaultsBase<ArcadeApiContext> {
constructor();
/**
* Create an EditorProfile for the given model id using the given definition and locale.
* The EditorProfile is used by the the Arcade Language service as well by the coding components.
* The definition can be a pre-defined profile or an editor profile definition.
* If the locale is not provided then the 'en' locale is used.
* @param modelId The model id for which to create the context.
* @param definition The definition to use for the model context.
* @param locale The locale to use for the model context.
* @returns The EditorProfile for the model.
*/
setProfileForModel(modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
locale: string;
snippets?: ApiSnippet[];
}): Promise<void>;
}
export declare const arcadeDefaults: ArcadeLanguageServiceDefaults;
export declare const arcade: {
setProfileForModel: (modelId: Uri | string, definition: IEditorProfileDefinition | IPredefinedProfile | undefined, apiContext?: {
locale: string;
snippets?: ApiSnippet[];
}) => Promise<void>;
getApiLibraryForModel: (modelId: string) => Promise<import('@arcgis/languages-api-utils').ApiCategory[]>;
};
export type { ArcadeLanguageServiceDefaults };