Open ovr opened 4 years ago
Hello, Small issue here when I build using tsc:
"@typescript-eslint/eslint-plugin": "^3.8.0",
"@typescript-eslint/parser": "^3.8.0",
"cross-env": "^7.0.2",
"ts-node-dev": "^1.1.8",
"tsconfig-paths": "^3.9.0",
"type-graphql": "^1.0.0-rc.3",
"typescript": "^3.9.7",
"@cubejs-backend/postgres-driver": "^0.28.46",
"@cubejs-backend/server-core": "^0.28.46"
I've taken a few stabs at converting both cubejs-client-core
and cubejs-client-react
. This is what I've learned:
.js
. (This didn't cause problems for cubejs-client-ws-transport
because it doesn't import any .ts
files.) PR #4541 would fix this, as well as a number of build warnings.@babel/preset-typescript
. I think that this would not catch type errors. Probably we should use e.g. @rollup/plugin-typescript
to transpile TypeScript instead of using Babel.index.d.ts
files. These scripts would presumably need to be modified.cubejs-client-core
are run directly on the source code, not on the compiled bundle. The test config would probably need an update to support TypeScript. The same is likely true of other packages with tests.
Hey!
In 2020 TypeScript started to be a standard (exclude
flow
in fb internals 😄 ) for every project, It helps use to:Before We start
High level iteration plan:
Scope
Due to the fact, that cube.js is not a small project, it's expected to have a plan, How to move it to TypeScript.
It's not possible to move module with dependency on another module that doesn't have typings. It's why dependency tree is useful to detect "core" modules.
Guide
Scope
Isolated packages
Frontend packages
Backend packages (base only)
Drivers
Non code
Thanks