Warn when calling deprecated functions (#5447)
* Warn when calling deprecated std functions Signed-off-by: Nick Cameron <nrc@ncameron.org> * Refactor function values Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -33,7 +33,7 @@ describe('processMemory', () => {
|
||||
const output = processMemory(execState.variables)
|
||||
expect(output.myVar).toEqual(5)
|
||||
expect(output.otherVar).toEqual(3)
|
||||
expect(output.myFn).toEqual('__function(a)__')
|
||||
expect(output.myFn).toEqual('__function__')
|
||||
expect(output.theExtrude).toEqual([
|
||||
{
|
||||
type: 'extrudePlane',
|
||||
|
@ -107,9 +107,7 @@ export const processMemory = (variables: VariableMap) => {
|
||||
}
|
||||
//@ts-ignore
|
||||
} else if (val.type === 'Function') {
|
||||
processedMemory[key] = `__function(${(val as any)?.expression?.params
|
||||
?.map?.(({ identifier }: any) => identifier?.name || '')
|
||||
.join(', ')})__`
|
||||
processedMemory[key] = `__function__`
|
||||
}
|
||||
}
|
||||
return processedMemory
|
||||
|
Reference in New Issue
Block a user