mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 03:31:45 +03:00
30 lines
630 B
JavaScript
30 lines
630 B
JavaScript
// @Filename: use.js
|
|
import * as s from './mod';
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @noEmit: true
|
|
// @Filename: mod.js
|
|
exports.n = {
|
|
};
|
|
exports.n.K = function() {
|
|
this.x = 10;
|
|
};
|
|
exports.Classic = function _class() {
|
|
"use strict";
|
|
_classCallCheck(this, _class);
|
|
this.p = 1;
|
|
};
|
|
var k = new s.n.K();
|
|
k.x;
|
|
var classic = new s.Classic();
|
|
/** @param {s.n.K} c
|
|
@param {s.Classic} classic */ function f(c, classic) {
|
|
c.x;
|
|
classic.p;
|
|
}
|