1

Is it possible to use module paths without having to use /// reference path.. with a .d.ts file?

For example if I have this in my requirejs config file :

require.config(
    {
       paths: {
          test : "/test/test1/TestFile"
       }
    }
);

I want to use : import TestFile = require('test')

instead of having to use : import TestFile = require('/test/test1/TestFile')

1 Answer 1

1

I want to use : import TestFile = require('test') instead of having to use : import TestFile = require('/test/test1/TestFile')

Not at the moment. You need to have a complete relative path OR use a module declaration.

FYI : grunt-ts can generate these long relative paths for you https://github.com/grunt-ts/grunt-ts/issues/85

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.