Skip to content

chore: update typescript version for development. #3783

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
Dec 30, 2016
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
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
},
"homepage": "https://github.com/angular/angular-cli",
"dependencies": {
"@angular-cli/ast-tools": "^1.0.0",
"@angular/compiler": "^2.3.1",
"@angular/compiler-cli": "^2.3.1",
"@angular/core": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular-cli/ast-tools/src/ast-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,5 @@ function getNodesOfKind(kind: ts.SyntaxKind, sourceFile: string) {

function getRootNode(sourceFile: string) {
return ts.createSourceFile(sourceFile, fs.readFileSync(sourceFile).toString(),
ts.ScriptTarget.ES6, true);
ts.ScriptTarget.Latest, true);
}
2 changes: 1 addition & 1 deletion packages/@angular-cli/ast-tools/src/ast-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import 'rxjs/add/operator/toPromise';
*/
export function getSource(filePath: string): ts.SourceFile {
return ts.createSourceFile(filePath, fs.readFileSync(filePath).toString(),
ts.ScriptTarget.ES6, true);
ts.ScriptTarget.Latest, true);
}


Expand Down
4 changes: 2 additions & 2 deletions packages/@angular-cli/ast-tools/src/change.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs = require('fs');
import denodeify = require('denodeify');

const readFile = (denodeify(fs.readFile) as (...args: any[]) => Promise<string>);
const writeFile = (denodeify(fs.writeFile) as (...args: any[]) => Promise<string>);
const readFile = (denodeify(fs.readFile) as (...args: any[]) => Promise<any>);
const writeFile = (denodeify(fs.writeFile) as (...args: any[]) => Promise<any>);

export interface Host {
write(path: string, content: string): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular-cli/ast-tools/src/route-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import denodeify = require('denodeify');
import * as _ from 'lodash';
import {it} from './spec-utils';

const readFile = (denodeify(fs.readFile) as (...args: any[]) => Promise<string>);
const readFile = (denodeify(fs.readFile) as (...args: any[]) => Promise<any>);


describe('route utils', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@angular-cli/ast-tools/src/route-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,5 @@ function getValueForKey(objectLiteralNode: ts.Node, key: string) {
* @param file
*/
function getRootNode(file: string) {
return ts.createSourceFile(file, fs.readFileSync(file).toString(), ts.ScriptTarget.ES6, true);
return ts.createSourceFile(file, fs.readFileSync(file).toString(), ts.ScriptTarget.Latest, true);
}
2 changes: 1 addition & 1 deletion packages/angular-cli/commands/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const GetCommand = Command.extend({
availableOptions: [],

run: function (commandOptions: any, rawArgs: string[]): Promise<void> {
return new Promise(resolve => {
return new Promise<void>(resolve => {
const config = CliConfig.fromProject();
const value = config.get(rawArgs[0]);

Expand Down
2 changes: 1 addition & 1 deletion packages/angular-cli/commands/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const SetCommand = Command.extend({
},

run: function (commandOptions: any, rawArgs: string[]): Promise<void> {
return new Promise(resolve => {
return new Promise<void>(resolve => {
const [jsonPath, rawValue] = rawArgs;
const config = CliConfig.fromProject();
const type = config.typeOf(jsonPath);
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-cli/utilities/get-dependent-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface ModuleMap {
export function createTsSourceFile(fileName: string): Promise<ts.SourceFile> {
return readFile(fileName, 'utf8')
.then((contents: string) => {
return ts.createSourceFile(fileName, contents, ts.ScriptTarget.ES6, true);
return ts.createSourceFile(fileName, contents, ts.ScriptTarget.Latest, true);
});
}

Expand Down