InterviewSolution
Saved Bookmarks
| 1. |
Define what is TypeScript Map file? |
|
Answer» DEFINE what is TypeScript Map file? TypeScript Map files are source map files that let tools map between the emitted JavaScript code and the TypeScript source files that created it. And this files will helps to debug the Typescript file instead of the Javascript file. And this Typescript map file is consumed by MANY debuggers to debug the Typescript. A source map file maps from the transpiled JavaScript file to the original TypeScript file. Below are the some keypoints of TypeScript Map file:- (1)Here reference to the JavaScript file is defined in a file FIELD. (2)As from above point we knows the reference to TypeScript file is in a sources field. And it is placed in the PROJECT structure. (3)In TypeScript file sourceRoot field is the root path of the TypeScript files. (4)Here version field help us to get the version of the source map spec which is being used. (5)The names field is a list of identifiers used in the source code that were changed or removed from the OUTPUT. (6)There is mapping field have have mapping information for every position in the javascript code back to positions in the TypeScript code. These are base64 encoded variable-length quantities. |
|