Skip to content

Commit 95cde62

Browse files
committed
Merge pull request #29 from NativeScript/fatme/no-implicit-any
--noImplicitAny compiler flag
2 parents a72bdb9 + fc3a99b commit 95cde62

File tree

8 files changed

+11
-10
lines changed

8 files changed

+11
-10
lines changed

Gruntfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ module.exports = function(grunt) {
2929
module: 'commonjs',
3030
sourceMap: true,
3131
declaration: false,
32-
removeComments: false
32+
removeComments: false,
33+
noImplicitAny: true
3334
},
3435

3536
devlib: {

lib/definitions/npm.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module "npm" {
22
var cache: string;
3-
var commands: any[];
4-
function load(config: Object, callback: (err: any, data: any) => void);
3+
var commands: { [index: string]: any };
4+
function load(config: Object, callback: (err: any, data: any) => void): void;
55
}

lib/definitions/osenv.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
declare module "osenv" {
2-
function home();
2+
function home(): string;
33
}

lib/definitions/shelljs.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ declare module "shelljs" {
22
function cp(arg: string, sourcePath: string, destinationPath: string): void;
33
function cp(arg: string, sourcePath: string[], destinationPath: string): void;
44
function sed(arg: string, oldValue: any, newValue: string, filePath: string): void;
5-
function mv(source: string[], destination: string);
5+
function mv(source: string[], destination: string): void;
66
function grep(what: any, where: string): any;
77
}

lib/node-package-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class NodePackageManager implements INodePackageManager {
6767
this.$logger.trace("Installing", packageName);
6868

6969
var future = new Future<void>();
70-
npm.commands["install"](pathToSave, packageName, (err, data) => {
70+
npm.commands["install"](pathToSave, packageName, (err: Error, data: any) => {
7171
if(err) {
7272
future.throw(err);
7373
} else {

lib/services/ios-project-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class IOSProjectService implements IPlatformProjectService {
8484
"-configuration", options.release,
8585
"build"
8686
];
87-
var args = [];
87+
var args: string[] = [];
8888

8989
if(options.device) {
9090
args = basicArgs.concat([

lib/services/platform-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import constants = require("./../constants");
77
import helpers = require("./../common/helpers");
88

99
class PlatformsData implements IPlatformsData {
10-
private platformsData = {};
10+
private platformsData : { [index: string]: any } = {};
1111

1212
constructor($androidProjectService: IPlatformProjectService,
1313
$iOSProjectService: IPlatformProjectService) {
@@ -22,7 +22,7 @@ class PlatformsData implements IPlatformsData {
2222
return Object.keys(this.platformsData);
2323
}
2424

25-
public getPlatformData(platform): IPlatformData {
25+
public getPlatformData(platform: string): IPlatformData {
2626
return this.platformsData[platform];
2727
}
2828
}

0 commit comments

Comments
 (0)