Open mindplay-dk opened 1 year ago
I also tried to run dev/hookyns/2
, following instructions here, and this doesn't work either.
At npx ttsc
, it fails with error messages like the following:
framework/Router.ts:12:38 - error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './controllers/IController.js'?
12 import { IController } from "./controllers/IController";
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I tried adding the .js
extensions, and was able to run it - and it says it's producing types:
[DEV] tst-reflect-transformer Completed!
Initialization: 0.06423 sec.
Type discovery and transformations: 0.00019 sec.
Serialization and emitting of metadata: 0.20191 sec.
Total time: 0.26634 sec.
Processed 191 type(s) from 18 module(s).
The version in the examples repo never displayed this message.
However, it also doesn't work, and with the added console.log
statement from above:
[
'::invalid::Invalid',
'::native::any',
'::native::unknown',
'::native::void',
'::native::never',
'::native::null',
'::native::undefined',
'::native::object',
'::native::String',
'::native::Number',
'::native::BigInt',
'::native::Boolean',
'::native::true',
'::native::false',
'::native::Date',
'::native::Error',
'::native::Symbol',
'::native::UniqueSymbol',
'::native::RegExp',
'::native::Int8Array',
'::native::Uint8Array',
'::native::Uint8ClampedArray',
'::native::Int16Array',
'::native::Uint16Array',
'::native::Int32Array',
'::native::Uint32Array',
'::native::Float32Array',
'::native::Float64Array',
'::native::BigInt64Array',
'::native::BigUint64Array',
'::native::ArrayBuffer',
'::native::SharedArrayBuffer',
'::native::Atomics',
'::native::DataView',
'::native::Array{::native::Any}',
'::native::Function'
]
It looks like there are still no reflections available at run-time.
Latest versions of TS, webpack, ts-loader and a lot of other tools does not work properly as I mentioned in the #7 Alpha issue it's the reason why I stoped working on the current Alpha and jumped right on the solution planned for 2024.
This StackBlitz example from the rttist.org website works. Try it out.
Here is StackBlitz example with decorators.
And here I get up and running the "MVC" example.
I found out that tst-reflect-transformer@1.0.0-alpha.11
is broken but version alpha.10 (tst-reflect-transformer@1.0.0-alpha.11
) works just fine.
Note that there are still other examples that don't work.
I haven't tested all of them, but I suspect this one is the only one that works right now.
I'm sure all the examples will need adjustments when you start making some of the bigger changes, but it might be a good idea to leave this issue open for other testers to notice.
I checked out the example repo - as mentioned here, I can't get it to work.
I tried adding this line to
registerControllers
:It looks like only the built-in types can be reflected:
I checked against
reflection.config.json
andtsconfig.json
indev/hookyns/2
in the main repo and tried a bunch of different settings - no luck, but I also don't see anything that looks wrong to me.Also updated from
alpha.6
toalpha.7
release.Really excited to try this out, but no idea what else to try...