Closed Arteha closed 5 years ago
Hej, there are transcompiled ./lib files (we use babel first and then Travis sends them up to npm). The problem you mentioned is caused by this index.d.ts
where we reference all components.
Now I am working on making this 100% typescript (maybe without automated tests for now), then I will add strict flags.
And thanks for admin-bro-typeorm :)
I've fixed that in version 1.4.0
How do we do the transpiling to get the source files?
I thought it would be something like
npm run build
, but that's not working for me.
npm run build
transpiles the files on the backend, and npm run bundle
bundles them on the frontend.
Część! :smiley: Your admin-panel is so fantastic! But developing admin-bro-typeorm adapter I found one fatal mistake:
You had published sources
./src
tonpm
but not compilation result like./lib
with*.d.ts
files.Try to edit
tsconfig.json
with"noEmit": false
"declaration": true
"declarationDir": "./lib"
"outDir": "./lib"
Then rename
index.d.ts
toindex.ts
and move it to./src
Of course you need to change package.json with:
"main": "./lib/index.js"
"types": "./lib/index.d.ts"
I think you understand what I mean.
You can also check, as example, how nestjs or typeorm published their build.
I really happy your moving to strict typization :rocket: But unfortunately for now your typings are impossible to be used.
P.S. If you want to feel full power of typescript then try
"strictNullChecks": true
:smile: it really helps.