TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
Object.entries
to Object.entries()
: http://www.typescriptlang.org/play/#code/NobwHgXABAjAvgXQHQFsCGAHAFAeQEYBWApgMYAuSRAdmQE4CWRAzgDxUCuKeRtAfAJRQA9EKgByDlx5ioAeyoAbAJ5RaRAGY8mUMrKhodSjEQA0UPOzJR627vSoBzKOyZEAJvu0GAbmgXsiKAALHiIkIA
I'm trying to create a package to export some constants and interfaces that we need for a project. The interfaces work just fine, but trying to import and use one of the exported constants gives an error in compilation with webpack.WARNING in ./src/app/app.component.ts 6:17-20
"export 'CONSTANT' was not found in 'package'
My package is made of:constants.ts
export const TEST="test";
index.js
import { TEST } from './constants'
module.exports = { TEST }
index.d.ts
export { TEST} from './constants'
After searching for a while i found webpack/webpack#7378 that seems to dive into the problem but i haven't found a soultion yet.
Any ideas?
constants.d.ts
?
.d.ts
per .ts
file, and they'll reference each other just like the JS files.
any
with unknown
in a lot of places
any
the same as unknown
?