How to avoid ugly imports in TS Triple-Slash Directives Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceTest if a variable is a list or tupleAccessing a property in a parent Component in Angular2 with TypeScriptTypescript. Are Triple-Slash references still required when using “import from”Cannot find module './in-memory-data-service' in tour of heroes for Angular2TypeScript 2: Using Namespaces without reference Triple-Slash DirectiveHow to define a typescript import path relative to some root (using webpack)?How to use typescript triple-slash reference comments to import another module and use the functions?importing global.d.ts without triple-slash directivesTriple-slash references when splitting namespaces across files?Using typings.d.ts in Angular library without tripple-slash reference

Make it rain characters

Can't figure this one out.. What is the missing box?

How to say that you spent the night with someone, you were only sleeping and nothing else?

Can smartphones with the same camera sensor have different image quality?

Cold is to Refrigerator as warm is to?

Is there folklore associating late breastfeeding with low intelligence and/or gullibility?

If I can make up priors, why can't I make up posteriors?

Using "nakedly" instead of "with nothing on"

How did the aliens keep their waters separated?

Writing Thesis: Copying from published papers

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

How do I automatically answer y in bash script?

What are the performance impacts of 'functional' Rust?

Is it possible to ask for a hotel room without minibar/extra services?

Why is there no army of Iron-Mans in the MCU?

How many spell slots should a Fighter 11/Ranger 9 have?

Complexity of many constant time steps with occasional logarithmic steps

If A makes B more likely then B makes A more likely"

Array/tabular for long multiplication

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

Does the STL have a way to apply a function before calling less than?

How to rotate it perfectly?

Stop battery usage [Ubuntu 18]

Who can trigger ship-wide alerts in Star Trek?



How to avoid ugly imports in TS Triple-Slash Directives



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
The Ask Question Wizard is Live!
Data science time! April 2019 and salary with experienceTest if a variable is a list or tupleAccessing a property in a parent Component in Angular2 with TypeScriptTypescript. Are Triple-Slash references still required when using “import from”Cannot find module './in-memory-data-service' in tour of heroes for Angular2TypeScript 2: Using Namespaces without reference Triple-Slash DirectiveHow to define a typescript import path relative to some root (using webpack)?How to use typescript triple-slash reference comments to import another module and use the functions?importing global.d.ts without triple-slash directivesTriple-slash references when splitting namespaces across files?Using typings.d.ts in Angular library without tripple-slash reference



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








2















I have a nested order structure. If I now used the triple slash directives, I have a long data path depending on the file like this:



/// <reference path="../../../../global.d.ts" />


The question I'm asking myself now is there a way to stop it from doing this?










share|improve this question






























    2















    I have a nested order structure. If I now used the triple slash directives, I have a long data path depending on the file like this:



    /// <reference path="../../../../global.d.ts" />


    The question I'm asking myself now is there a way to stop it from doing this?










    share|improve this question


























      2












      2








      2








      I have a nested order structure. If I now used the triple slash directives, I have a long data path depending on the file like this:



      /// <reference path="../../../../global.d.ts" />


      The question I'm asking myself now is there a way to stop it from doing this?










      share|improve this question
















      I have a nested order structure. If I now used the triple slash directives, I have a long data path depending on the file like this:



      /// <reference path="../../../../global.d.ts" />


      The question I'm asking myself now is there a way to stop it from doing this?







      typescript types






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 22 at 9:26









      Pureferret

      3,351954110




      3,351954110










      asked Mar 22 at 7:21









      CkappoCkappo

      121111




      121111






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Since TypeScript 1.5 (see section "Lightweight, portable projects"), the syntax /// <reference is replaced by a configuration file tsconfig.json.



          An example for Node.js:



          // tsconfig.json

          "compilerOptions":
          "module": "commonjs",
          "target": "es6",
          "outDir": "dist"
          ,
          "exclude": [
          "dist",
          "node_modules"
          ]



          In the tsconfig.json file, include and exclude properties can be defined. When an exclude property is defined, then all the rest is by default included. Now your project could look like:



          - project-directory/
          |- dist/
          |- node_modules/
          |- src/
          |- global.d.ts
          |- path/to/other/files.ts
          |- tsconfig.json





          share|improve this answer

























          • ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

            – Ckappo
            Mar 22 at 10:06











          • @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

            – Paleo
            Mar 22 at 10:28












          • Ty Paleo. Works like I want

            – Ckappo
            Mar 25 at 8:23











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55294686%2fhow-to-avoid-ugly-imports-in-ts-triple-slash-directives%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Since TypeScript 1.5 (see section "Lightweight, portable projects"), the syntax /// <reference is replaced by a configuration file tsconfig.json.



          An example for Node.js:



          // tsconfig.json

          "compilerOptions":
          "module": "commonjs",
          "target": "es6",
          "outDir": "dist"
          ,
          "exclude": [
          "dist",
          "node_modules"
          ]



          In the tsconfig.json file, include and exclude properties can be defined. When an exclude property is defined, then all the rest is by default included. Now your project could look like:



          - project-directory/
          |- dist/
          |- node_modules/
          |- src/
          |- global.d.ts
          |- path/to/other/files.ts
          |- tsconfig.json





          share|improve this answer

























          • ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

            – Ckappo
            Mar 22 at 10:06











          • @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

            – Paleo
            Mar 22 at 10:28












          • Ty Paleo. Works like I want

            – Ckappo
            Mar 25 at 8:23















          2














          Since TypeScript 1.5 (see section "Lightweight, portable projects"), the syntax /// <reference is replaced by a configuration file tsconfig.json.



          An example for Node.js:



          // tsconfig.json

          "compilerOptions":
          "module": "commonjs",
          "target": "es6",
          "outDir": "dist"
          ,
          "exclude": [
          "dist",
          "node_modules"
          ]



          In the tsconfig.json file, include and exclude properties can be defined. When an exclude property is defined, then all the rest is by default included. Now your project could look like:



          - project-directory/
          |- dist/
          |- node_modules/
          |- src/
          |- global.d.ts
          |- path/to/other/files.ts
          |- tsconfig.json





          share|improve this answer

























          • ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

            – Ckappo
            Mar 22 at 10:06











          • @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

            – Paleo
            Mar 22 at 10:28












          • Ty Paleo. Works like I want

            – Ckappo
            Mar 25 at 8:23













          2












          2








          2







          Since TypeScript 1.5 (see section "Lightweight, portable projects"), the syntax /// <reference is replaced by a configuration file tsconfig.json.



          An example for Node.js:



          // tsconfig.json

          "compilerOptions":
          "module": "commonjs",
          "target": "es6",
          "outDir": "dist"
          ,
          "exclude": [
          "dist",
          "node_modules"
          ]



          In the tsconfig.json file, include and exclude properties can be defined. When an exclude property is defined, then all the rest is by default included. Now your project could look like:



          - project-directory/
          |- dist/
          |- node_modules/
          |- src/
          |- global.d.ts
          |- path/to/other/files.ts
          |- tsconfig.json





          share|improve this answer















          Since TypeScript 1.5 (see section "Lightweight, portable projects"), the syntax /// <reference is replaced by a configuration file tsconfig.json.



          An example for Node.js:



          // tsconfig.json

          "compilerOptions":
          "module": "commonjs",
          "target": "es6",
          "outDir": "dist"
          ,
          "exclude": [
          "dist",
          "node_modules"
          ]



          In the tsconfig.json file, include and exclude properties can be defined. When an exclude property is defined, then all the rest is by default included. Now your project could look like:



          - project-directory/
          |- dist/
          |- node_modules/
          |- src/
          |- global.d.ts
          |- path/to/other/files.ts
          |- tsconfig.json






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 22 at 10:25

























          answered Mar 22 at 8:50









          PaleoPaleo

          9,4782343




          9,4782343












          • ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

            – Ckappo
            Mar 22 at 10:06











          • @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

            – Paleo
            Mar 22 at 10:28












          • Ty Paleo. Works like I want

            – Ckappo
            Mar 25 at 8:23

















          • ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

            – Ckappo
            Mar 22 at 10:06











          • @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

            – Paleo
            Mar 22 at 10:28












          • Ty Paleo. Works like I want

            – Ckappo
            Mar 25 at 8:23
















          ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

          – Ckappo
          Mar 22 at 10:06





          ok so in the tsconfig.json I can... include the global.d.ts? Can you give me an example with the global.d.ts? Should it be in the path object?

          – Ckappo
          Mar 22 at 10:06













          @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

          – Paleo
          Mar 22 at 10:28






          @Ckappo I edited. If you exclude something, all the rest will be included. You can put global.d.ts in the project root directory or in any non-excluded sub-directory.

          – Paleo
          Mar 22 at 10:28














          Ty Paleo. Works like I want

          – Ckappo
          Mar 25 at 8:23





          Ty Paleo. Works like I want

          – Ckappo
          Mar 25 at 8:23



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55294686%2fhow-to-avoid-ugly-imports-in-ts-triple-slash-directives%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해