Skip to content

feat(typescript) bring in typescript source #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function (grunt) {
target: 'es5',
module: 'commonjs',
sourceMap: false,
preserveConstEnums: false,
preserveConstEnums: true,
compiler: './node_modules/typescript/bin/tsc'
},
dev: {
Expand Down
2 changes: 0 additions & 2 deletions dist/globals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/// <reference path="./typings/tsd.d.ts"/>
/// <reference path="../node_modules/typescript/bin/typescript.d.ts"/>
/// <reference path="../node_modules/typescript/bin/typescript_internal.d.ts"/>
/// <reference path="./typings/bluebird.d.ts"/>
/// <reference path="./typings/codemirror.d.ts"/>
/// <reference path="./typings/brackets.d.ts"/>
Expand Down
3 changes: 3 additions & 0 deletions dist/linter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// This file is only called from linter
// See : https://github.com/AtomLinter/Linter/issues/337
/// <reference path="./globals.ts"/> ///ts:ref:generated
var makeTypeScriptGlobal_1 = require("./typescript/makeTypeScriptGlobal");
makeTypeScriptGlobal_1.makeTsGlobal();
var parent = require('./worker/parent');
var fs = require('fs');
var linterPath = atom.packages.getLoadedPackage("linter").path;
Expand Down
1 change: 0 additions & 1 deletion dist/main/atom/typescriptGrammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var __extends = this.__extends || function (d, b) {
__.prototype = b.prototype;
d.prototype = new __();
};
var ts = require('typescript');
var TokenClass = ts.TokenClass;
global.AtomTSBaseGrammar = require(atom.config.resourcePath + "/node_modules/first-mate/lib/grammar.js");
var TypeScriptSemanticGrammar = (function (_super) {
Expand Down
2 changes: 2 additions & 0 deletions dist/main/atomts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
///ts:ref=globals
/// <reference path="../globals.ts"/> ///ts:ref:generated
var makeTypeScriptGlobal_1 = require("../typescript/makeTypeScriptGlobal");
makeTypeScriptGlobal_1.makeTsGlobal();
var path = require('path');
var fs = require('fs');
var apd = require('atom-package-dependencies');
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/core/languageServiceHost2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var ts = require('typescript');
var path = require('path');
var fs = require('fs');
var textBuffer = require('basarat-text-buffer');
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/core/project.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
///ts:ref=globals
/// <reference path="../../../globals.ts"/> ///ts:ref:generated
var ts = require('typescript');
exports.languageServiceHost = require('./languageServiceHost2');
var Project = (function () {
function Project(projectFile) {
Expand Down
4 changes: 1 addition & 3 deletions dist/main/lang/fixmyts/addClassMember.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
var ts = require("typescript");
var ast = require("./astUtils");
var os_1 = require("os");
var typescript_1 = require("typescript");
function getIdentifierAndClassNames(error) {
var errorText = error.messageText;
if (typeof errorText !== 'string') {
Expand Down Expand Up @@ -42,7 +40,7 @@ var AddClassMember = (function () {
&& parentOfParent.operatorToken.getText().trim() == '=') {
var binaryExpression = parentOfParent;
var type = info.typeChecker.getTypeAtLocation(binaryExpression.right);
typeString = typescript_1.displayPartsToString(typescript_1.typeToDisplayParts(info.typeChecker, type)).replace(/\s+/g, ' ');
typeString = ts.displayPartsToString(ts.typeToDisplayParts(info.typeChecker, type)).replace(/\s+/g, ' ');
}
var memberTarget = ast.getNodeByKindAndName(info.program, 201, className);
if (!memberTarget) {
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/fixmyts/astUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var ts = require("typescript");
exports.forEachChild = ts.forEachChild;
function forEachChildRecursive(node, cbNode, depth) {
if (depth === void 0) { depth = 0; }
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/modules/astToText.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
// Inspired by `ts.forEachChild`:
// https://github.com/Microsoft/TypeScript/blob/65cbd91667acf890f21a3527b3647c7bc994ca32/src/compiler/parser.ts#L43-L320
var ts = require("typescript");
function astToText(srcFile) {
//// A useful function for debugging
// aggregate(srcFile, 0);
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/modules/building.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
var ts = require('typescript');
var mkdirp = require('mkdirp');
var path = require('path');
var fs = require('fs');
Expand Down
4 changes: 2 additions & 2 deletions dist/main/lang/modules/getExternalModules.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var typescript_1 = require("typescript");
// From https://github.com/Microsoft/TypeScript/pull/2173/files
function getExternalModuleNames(program) {
var entries = [];
program.getSourceFiles().forEach(function (sourceFile) {
typescript_1.forEachChild(sourceFile, function (child) {
ts.forEachChild(sourceFile, function (child) {
if (child.kind === 205 && child.name.kind === 8) {
entries.push(child.name.text);
}
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/modules/programDependencies.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var tsconfig_1 = require("../../tsconfig/tsconfig");
var ts = require("typescript");
var path = require("path");
var fs = require("fs");
function getDependencies(projectFile, program) {
Expand Down
1 change: 0 additions & 1 deletion dist/main/lang/projectService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/// <reference path="../../globals.ts"/> ///ts:ref:generated
var fs = require('fs');
var path = require('path');
var ts = require('typescript');
var fuzzaldrin = require('fuzzaldrin');
var tsconfig = require('../tsconfig/tsconfig');
var utils = require('./utils');
Expand Down
1 change: 0 additions & 1 deletion dist/main/tsconfig/tsconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function errorWithDetails(error, details) {
var fs = require('fs');
var path = require('path');
var expand = require('glob-expand');
var ts = require('typescript');
var os = require('os');
var formatting = require('./formatting');
var projectFileName = 'tsconfig.json';
Expand Down
Loading