feat(editor): Add missing extension methods for expressions (#8845)
This commit is contained in:
16
packages/workflow/src/NativeMethods/Boolean.methods.ts
Normal file
16
packages/workflow/src/NativeMethods/Boolean.methods.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
|
||||
export const booleanMethods: NativeDoc = {
|
||||
typeName: 'Boolean',
|
||||
functions: {
|
||||
toString: {
|
||||
doc: {
|
||||
name: 'toString',
|
||||
description: 'returns a string representing this boolean value.',
|
||||
docURL:
|
||||
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean/toString',
|
||||
returnType: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -6,6 +6,7 @@ export const numberMethods: NativeDoc = {
|
||||
toFixed: {
|
||||
doc: {
|
||||
name: 'toFixed',
|
||||
hidden: true,
|
||||
description:
|
||||
'Formats a number using fixed-point notation. `digits` defaults to null if not given.',
|
||||
docURL:
|
||||
@@ -17,6 +18,7 @@ export const numberMethods: NativeDoc = {
|
||||
toPrecision: {
|
||||
doc: {
|
||||
name: 'toPrecision',
|
||||
hidden: true,
|
||||
description: 'Returns a string representing the number to the specified precision.',
|
||||
docURL:
|
||||
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toPrecision',
|
||||
@@ -24,5 +26,14 @@ export const numberMethods: NativeDoc = {
|
||||
args: [{ name: 'precision?', type: 'number' }],
|
||||
},
|
||||
},
|
||||
toString: {
|
||||
doc: {
|
||||
name: 'toString',
|
||||
description: 'returns a string representing this number value.',
|
||||
docURL:
|
||||
'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString',
|
||||
returnType: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3,7 +3,14 @@ import { arrayMethods } from './Array.methods';
|
||||
import { numberMethods } from './Number.methods';
|
||||
import { objectMethods } from './Object.Methods';
|
||||
import type { NativeDoc } from '@/Extensions/Extensions';
|
||||
import { booleanMethods } from './Boolean.methods';
|
||||
|
||||
const NATIVE_METHODS: NativeDoc[] = [stringMethods, arrayMethods, numberMethods, objectMethods];
|
||||
const NATIVE_METHODS: NativeDoc[] = [
|
||||
stringMethods,
|
||||
arrayMethods,
|
||||
numberMethods,
|
||||
objectMethods,
|
||||
booleanMethods,
|
||||
];
|
||||
|
||||
export { NATIVE_METHODS as NativeMethods };
|
||||
|
||||
Reference in New Issue
Block a user