Stream: implementers
Topic: Angular 6 - @types/fhir
Kevin Mayfield (Sep 20 2018 at 06:41):
After installing via
npm install --save @types/fhir
Code such as:
public conformance :fhir.Conformance;
Causes: error TS2503: Cannot find namespace 'fhir'.
I've have this working in other projects where this was the only fhir related import.
In others where I've used @types/fhir-js-client and fhir-js-client I also had the same problem I managed to get it working by including:
import {} from '@types/fhir';
Any ideas to get around this error??? I've tried removing the fhir-js-client, that didn't work.
Kevin Mayfield (Sep 20 2018 at 06:49):
FIXED!
Altered tsconfig.app.json and included
"types": [ "fhir" ], "typeRoots": [ "node_modules/@types" ]
Corrected my code to STU3.
public conformance :fhir.CapabilityStatement;
Last updated: Apr 12 2022 at 19:14 UTC