mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-26 06:34:20 +08:00
Fixes #934 Co-authored-by: Alan Leal <33952+alantriesagain@users.noreply.github.com>
13 lines
399 B
JavaScript
13 lines
399 B
JavaScript
// @ts-check
|
|
// A JavaScript file TypeScript checks reports the type errors that protect
|
|
// its JSDoc types, as a TypeScript file does.
|
|
class Account {
|
|
/** @param {number} balance */
|
|
constructor(balance) {
|
|
this.balance = balance;
|
|
}
|
|
}
|
|
const account = new Account("10");
|
|
console.log(account.balance);
|
|
// End with a nonblank context line so diagnostic snapshots carry no trailing whitespace.
|