swc/crates/jsdoc/tests/fixtures/es6.js

31 lines
549 B
JavaScript
Raw Normal View History

2020-08-14 12:20:25 +03:00
'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';