TSLint 和 VSCode 问题:所有解构的元素都未使用
TSLint and VSCode Issues: All destructured elements are unused
错误 1:
Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead. (no-angle-bracket-type-assertion)tslint(1)
This assertion is unnecessary since it does not change the type of the expression. (no-unnecessary-type-assertion)tslint(1)
'SchemaForm' refers to a value, but is being used as a type here.ts(2749)
错误2:
All destructured elements are unused.
错误 3
Cannot find name 'container'.
What settings gone missing?
VSCode: Latest Version
OS: Mac Catalina 10.15.3
JSX 语法仅在 .tsx
文件中有效。由于您在 .ts
文件中,打字稿将尝试将 <>
解释为类型断言而不是 JSX 标记,并且解析从那里变得糟糕。更改扩展名,它应该可以工作
错误 1:
Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead. (no-angle-bracket-type-assertion)tslint(1)
This assertion is unnecessary since it does not change the type of the expression. (no-unnecessary-type-assertion)tslint(1)
'SchemaForm' refers to a value, but is being used as a type here.ts(2749)
错误2:
All destructured elements are unused.
错误 3
Cannot find name 'container'.
What settings gone missing?
VSCode: Latest Version
OS: Mac Catalina 10.15.3
JSX 语法仅在 .tsx
文件中有效。由于您在 .ts
文件中,打字稿将尝试将 <>
解释为类型断言而不是 JSX 标记,并且解析从那里变得糟糕。更改扩展名,它应该可以工作