0

I have the following declarations:

declare var __DEV__: boolean;
declare var BROWSER: boolean;

If I have these in an index.d.ts file then how do I bring this into a project?

If I do this:

import '../../../../types/index.d.ts';

I get this error:

TypeScript declaration files should never be required

1 Answer 1

1

Two ways, /// <reference path="..." /> or through tsconfig.json

{
  "files": [
    "..."
   ]
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.