Relative Content

Tag Archive for javascriptnode.jstypescript

Accessing Properties that are decided at runtime

The employee type can be either PartTime | FullTime and is decided at run time. Now since this is decided at runtime, every line where I use employeeType, I am unable to navigate to the desired method using [CMD + Click] on VS Code. Each time I access methods that are not available in all the other Classes (like Bonus method in FullTime Class), I get the following warning

whenever I use Yarn run dev on my terminal for backend code, it is throwing (reading “fragment”) error!!! what could be the reason?

I am getting the following error on my terminal..after typing yarn run dev..
yarn run v1.22.22
$ set NODE_PATH=%NODE_PATH%;./src && ts-node-dev –respawn –transpile-only ./src/server.ts
[INFO] 12:13:14 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.1, typescript ver. 5.3.3)
event-loop-stats not found, ignoring event loop metrics…
[ERROR] 12:13:27 TypeError: Cannot read properties of undefined (reading ‘fragment’)
(node:20148) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.