#Please help me with filling out the tsconfig

1 messages · Page 1 of 1 (latest)

astral dawn
#
{
  "compilerOptions": {
    "module": "ES2020",
    "target": "ES2021",
    "moduleResolution": "Node",
    "allowSyntheticDefaultImports": true,
    "baseUrl": "./src",
    "rootDir": "./src",
    "outDir": "./scripts"
  },
  "exclude": ["node_modules", "node_modules/@minecraft"],
  "include": ["src"]
}
crisp briar
#

You can cast the component to the correct type. I am unsure if that can really be fixed through the tsconfig file.

let hp: number = Math.ceil((hurtEntity.getComponent(EntityComponentTypes.Health) as EntityHealthComponent).currentValue);