You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
app.ts:8:25 - error TS2693: 'User' only refers to a type, but is being used as a value here.
8 const user = cast<User>(User, {
~~~~
app.ts:9:5 - error TS2353: Object literal may only specify known properties, and 'username' does not exist in type 'SerializationOptions'.
9 username: 'Peter',
~~~~~~~~
app.ts:14:41 - error TS2693: 'User' only refers to a type, but is being used as a value here.
14 const reflection = ReflectionClass.from(User);
~~~~
git clone https://gitlab.com/micalevisk/deepkit-runtime-type-starter-issue.git
cd deepkit-runtime-type-starter-issue
npm i
./node_modules/.bin/ts-node app.ts
running node_modules/.bin/deepkit-type-install didn't fix it neither.
The text was updated successfully, but these errors were encountered:
After following the steps at https://deepkit.io/documentation/runtime-types/getting-started (everything before the Type compiler section) I'm seeing this error:
return new TSError(diagnosticText, diagnosticCodes, diagnostics); ^ TSError: ⨯ Unable to compile TypeScript: app.ts:8:25 - error TS2693: 'User' only refers to a type, but is being used as a value here. 8 const user = cast<User>(User, { ~~~~ app.ts:9:5 - error TS2353: Object literal may only specify known properties, and 'username' does not exist in type 'SerializationOptions'. 9 username: 'Peter', ~~~~~~~~ app.ts:14:41 - error TS2693: 'User' only refers to a type, but is being used as a value here. 14 const reflection = ReflectionClass.from(User); ~~~~
The repro: https://gitlab.com/micalevisk/deepkit-runtime-type-starter-issue
Steps to reproduce:
git clone https://gitlab.com/micalevisk/deepkit-runtime-type-starter-issue.git cd deepkit-runtime-type-starter-issue npm i ./node_modules/.bin/ts-node app.ts
running
node_modules/.bin/deepkit-type-install
didn't fix it neither.The text was updated successfully, but these errors were encountered: