refactor(*.ts): noImplicitReturns = true

PR #357, Ref #347
This commit is contained in:
zkochan
2016-09-11 23:57:13 +03:00
parent 2f26f61409
commit 356b8b27c4
4 changed files with 5 additions and 4 deletions

View File

@@ -5,4 +5,5 @@ export default function getSaveType (opts: PublicInstallationOptions): Dependenc
if (opts.save || opts.global) return 'dependencies'
if (opts.saveDev) return 'devDependencies'
if (opts.saveOptional) return 'optionalDependencies'
return null
}

View File

@@ -55,7 +55,7 @@ function isScopedPkgsDir (dirPath: string) {
export function linkPkgBins (modules: string, target: string) {
const pkg = tryRequire(path.join(target, 'package.json'))
if (!pkg || !pkg.bin) return
if (!pkg || !pkg.bin) return Promise.resolve()
const bins = binify(pkg)
const binDir = path.join(modules, '.bin')
@@ -140,5 +140,5 @@ function cmdShim (proxyPath: string, targetPath: string) {
*/
function tryRequire (path: string) {
try { return requireJson(path) } catch (e) { }
try { return requireJson(path) } catch (e) { return null }
}

View File

@@ -10,7 +10,7 @@ import {InstalledPackages} from '../api/install'
*/
export default function linkPeers (store: string, installs: InstalledPackages) {
if (!installs) return
if (!installs) return Promise.resolve()
const peers = {}
const roots = {}

View File

@@ -5,7 +5,7 @@
"sourceMap": true,
"declaration": true,
"noImplicitAny": true,
"noImplicitReturns": false,
"noImplicitReturns": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es6",
"outDir": "lib",