TypeScript Cannot Find Names
Posted: Fri Feb 03, 2023 3:33 pm
Hello,
I've just tried making my first TypeScript file since having Switch Spring 2022.
I used the follow SwitchScriptTool command to make the folder:
After opening main.ts in Visual Studio Code, I'm immeditaley presented with these three errors, which apply to the JobArrive function declaration:
I'd assumed that as I used SwitchScriptTool, all of the type definitions should already be setup for me, can someone please assist?
I've just tried making my first TypeScript file since having Switch Spring 2022.
I used the follow SwitchScriptTool command to make the folder:
Code: Select all
"C:\Program Files\Enfocus\Enfocus Switch\SwitchScriptTool\SwitchScriptTool.exe" --create "SendOrdersToPrinter" .\
Code: Select all
[{
"resource": "/d:/ControlFiles/Switch Assets/Scripts/Client Specific/Shell/SendOrdersToPrinter/main.ts",
"owner": "typescript",
"code": "2304",
"severity": 8,
"message": "Cannot find name 'Switch'.",
"source": "ts",
"startLineNumber": 3,
"startColumn": 30,
"endLineNumber": 3,
"endColumn": 36
},{
"resource": "/d:/ControlFiles/Switch Assets/Scripts/Client Specific/Shell/SendOrdersToPrinter/main.ts",
"owner": "typescript",
"code": "2304",
"severity": 8,
"message": "Cannot find name 'FlowElement'.",
"source": "ts",
"startLineNumber": 3,
"startColumn": 51,
"endLineNumber": 3,
"endColumn": 62
},{
"resource": "/d:/ControlFiles/Switch Assets/Scripts/Client Specific/Shell/SendOrdersToPrinter/main.ts",
"owner": "typescript",
"code": "2304",
"severity": 8,
"message": "Cannot find name 'Job'.",
"source": "ts",
"startLineNumber": 3,
"startColumn": 69,
"endLineNumber": 3,
"endColumn": 72
}]