swc/ecmascript/jsdoc/tests/fixtures/es6.js
2020-08-14 18:20:25 +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';