swc/crates/jsdoc/tests/fixtures/es6.js
2021-11-10 16:39:01 +09:00

31 lines
549 B
JavaScript

'use strict';
// ArrowFunctionExpression
["Model", "View", "Controller"].forEach(name => console.log(name));
// ClassBody, ClassDeclaration, MethodDefinition
class Socket {
constructor(port) {
// ...
}
open() {
// ...
}
close() {
// ...
}
}
// ClassExpression
var WebSocket = class extends Socket {
// ...
};
// ExportBatchSpecifier, ExportDeclaration
export * from 'lib/network';
// ExportSpecifier
export { Socket };
// ImportDeclaration, ImportSpecifier
import { Packet } from 'lib/data';