import DataTypes = require('./lib/data-types')
Please someone explain to me. Why can use import and require together. This is in a module of NodeJS. Sequelize
import DataTypes = require('./lib/data-types')
Please someone explain to me. Why can use import and require together. This is in a module of NodeJS. Sequelize
This syntax is specific to TypeScript. See: https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
The export = syntax specifies a single object that is exported from the module. This can be a class, interface, namespace, function, or enum.
When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module.