0

I have config

"exclude": [
"node_modules",
"functions/node_modules",
"typings/browser.d.ts",
"typings/browser"
]

and imports;

import * as admin from "firebase-admin";
import DateUtilities from "../Utilities/DateUtilities";
import CoreUtilities from "../Utilities/CoreUtilities";

and method like;

async GetDocumentData(id: string): Promise<DocumentData> {
let snapshot = await this.GetDocumentSnapshot(id);
return await snapshot.data();
}

DocumentData is a module comes from firebase-admin. Normally if I don't use it in GetDocumentData return value tsc does not try to compile it.

But once I start to use it, it tries to validate all referenced modules like below:

[image]

How can I force exclude them?

Praveen Rao Chavan.G
  • 2,772
  • 3
  • 22
  • 33
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158

1 Answers1

1

After some search I found out I had to use tsc --skipLibCheck

https://github.com/Microsoft/TypeScript/issues/14293

https://www.typescriptlang.org/docs/handbook/compiler-options.html

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158