mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
7 lines
355 B
Text
7 lines
355 B
Text
language js
|
|
|
|
`const $name = new $constructor($callback)` as $stmt where {
|
|
or { $callback <: `() => $body`, $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")
|
|
}
|