Docs: reduce number of API Extractor warnings

This commit is contained in:
Jack Westbrook 2021-05-11 18:47:34 +02:00 committed by GitHub
parent 7cd4066e9a
commit e13f15f646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 1 deletions

View File

@ -1,7 +1,13 @@
import { Registry, RegistryItem } from '../utils/Registry';
/**
* @alpha
*/
export interface MonacoLanguageRegistryItem extends RegistryItem {
init: () => Promise<void>;
}
/**
* @alpha
*/
export const monacoLanguageRegistry = new Registry<MonacoLanguageRegistryItem>();

View File

@ -1,39 +1,63 @@
/**
* @alpha
*/
export enum MappingType {
ValueToText = 'value', // was 1
RangeToText = 'range', // was 2
SpecialValue = 'special',
}
/**
* @alpha
*/
export interface ValueMappingResult {
text?: string;
color?: string;
index?: number;
}
/**
* @alpha
*/
interface BaseValueMap<T> {
type: MappingType;
options: T;
}
/**
* @alpha
*/
export interface ValueMap extends BaseValueMap<Record<string, ValueMappingResult>> {
type: MappingType.ValueToText;
}
/**
* @alpha
*/
export interface RangeMapOptions {
from: number | null; // changed from string
to: number | null;
result: ValueMappingResult;
}
/**
* @alpha
*/
export interface RangeMap extends BaseValueMap<RangeMapOptions> {
type: MappingType.RangeToText;
}
/**
* @alpha
*/
export interface SpecialValueOptions {
match: SpecialValueMatch;
result: ValueMappingResult;
}
/**
* @alpha
*/
export enum SpecialValueMatch {
True = 'true',
False = 'false',
@ -43,8 +67,14 @@ export enum SpecialValueMatch {
Empty = 'empty',
}
/**
* @alpha
*/
export interface SpecialValueMap extends BaseValueMap<SpecialValueOptions> {
type: MappingType.SpecialValue;
}
/**
* @alpha
*/
export type ValueMapping = ValueMap | RangeMap | SpecialValueMap;

View File

@ -1,6 +1,10 @@
import { toNumber } from 'lodash';
/** Will return any value as a number or NaN */
/**
* Will return any value as a number or NaN
*
* @internal
* */
export function anyToNumber(value: any): number {
if (typeof value === 'number') {
return value;