Open philippos86 opened 4 years ago
Cannot find name surface
.
I resolved this problem based on the answers to the following question:
TypeScript getting error TS2304: cannot find name ' require'
by adding the following line at the top of my file:
declare var surface: any;
(I am not sure if this correct or not, but it took away the error message)
Now still have the await
problem ...
it is as it is descrbied, you can not await in the top level of the scope. either wrap everything inside an async function or do not await the function calls
I'm on Mac, and trying to execute the first example on the homepage. However, I am receiving the following errors:
Cannot find name surface
.Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher.ts(1378)
I'm sorry if my issue is trivial, but I'm quite new to typescript. How to solve these error messages?