@arcgis/coding-components
Version:
Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.
17 lines (16 loc) • 847 B
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
import { editor } from 'monaco-editor';
type KeysOfType<T, U> = {
[P in keyof T]: T[P] extends U ? P : never;
}[keyof T];
/**
* Filters a collection of items by the given keys and filter word.
*/
export declare function filterCollection<T, U extends KeysOfType<T, string | undefined>>(collection: T[], keys: U | U[], filterWord: string, beforeFilteringFn?: (item: T) => boolean | undefined): T[];
/**
* Returns the url to the portal item.
*/
export declare function portalItemPageUrl(portalItem: __esri.PortalItem | null | undefined): string;
export declare function editModel(editorInstance: editor.IStandaloneCodeEditor | undefined, script: string, insertMode?: "add" | "replace", disclaimer?: string): void;
export declare function formatResult(script: string): string;
export {};