We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At present, all modules are imported directly using the import statement, such as:
import fs from 'fs' import pkg from './package.json'
output code
var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const fs_1 = __importDefault(require("fs")); const package_1 = __importDefault(require("./package"));
__importDefault is too redundant.
__importDefault
Maybe import = require() is a better choice for the commonjs module, such as:
import fs = require('fs') export const contents = fs.readFileSync(...)
var fs_1 = require("./fs"); exports.contents = fs_1.readFileSync(...)
ref:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At present, all modules are imported directly using the import statement, such as:
output code
__importDefault
is too redundant.Maybe import = require() is a better choice for the commonjs module, such as:
output code
ref:
The text was updated successfully, but these errors were encountered: