mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
14 lines
646 B
Text
14 lines
646 B
Text
language js
|
|
|
|
or {
|
|
`const $name = new $constructor($callback)` as $stmt where {
|
|
$callback <: `() => $body`,
|
|
$body <: contains `$name`,
|
|
register_diagnostic(span=$stmt, message="Avoid referencing a variable from a callback inside its own initializer; declare it first with an explicit type.", severity="error")
|
|
},
|
|
`const $name = new $constructor($callback)` as $stmt where {
|
|
$callback <: `function() { $body }`,
|
|
$body <: contains `$name`,
|
|
register_diagnostic(span=$stmt, message="Avoid referencing a variable from a callback inside its own initializer; declare it first with an explicit type.", severity="error")
|
|
}
|
|
}
|