When we write js code, call each other often encounter between two js files directly on the code:
messageText.js
1 |
// definition array |
In A.js the call messageText.js
1 |
const msg_1 = require("./messageText"); |
In the above example, I made a string of data1 this localization process, is to replace the array name as a value;
if you want constant B.js references, it is very simple:
1 |
msg_1.messageText.a_name |
Such value can be obtained in the a_name B.js.
ts file usage calls between some differences, as follows:
messageText.ts
1 |
export class MessageText { |
Js call messageText.ts call in the A.ts
1 |
import {MessageText} from 'vs / workbench / api / common / messageText'; // Note form '' your project directory |
Original: Large column JS file call each other