mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
JS: Remove invalid syntax from test
TS decorators may not appear on functions and enums
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#select
|
||||
| Babelrc/importPragma.jsx:2:1:2:27 | import ... react'; | Unused import q. |
|
||||
| decorated.ts:1:1:1:126 | import ... where'; | Unused import actionHandler. |
|
||||
| decorated.ts:4:10:4:12 | fun | Unused function fun. |
|
||||
| eval.js:10:9:10:24 | not_used_by_eval | Unused variable not_used_by_eval. |
|
||||
| eval.js:19:9:19:24 | not_used_by_eval | Unused variable not_used_by_eval. |
|
||||
| externs.js:5:5:5:13 | iAmUnused | Unused variable iAmUnused. |
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import {actionHandler, actionHandlerFactory, actionHandlerFactoryProvider, actionHandlerFactoryProviderKind} from 'somewhere'; // OK - imports used as decorators
|
||||
|
||||
@actionHandler
|
||||
function fun() {} // OK - decorator might use the function
|
||||
import { actionHandlerFactory, actionHandlerFactoryProvider } from 'somewhere'; // OK - imports used as decorators
|
||||
|
||||
@actionHandlerFactory
|
||||
class Class {} // OK - decorator might use the class
|
||||
class Class { } // OK - decorator might use the class
|
||||
|
||||
@actionHandlerFactoryProvider
|
||||
export class ExportedClass {} // OK - decorator might use the class
|
||||
|
||||
@actionHandlerFactoryProviderKind
|
||||
enum Enum { plain } // OK - decorator might use the enum
|
||||
export class ExportedClass { } // OK - decorator might use the class
|
||||
|
||||
Reference in New Issue
Block a user