mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
build: add v8-profiler typings
After some refactoring on the angular/cli init, v8-profiler typing is required in order to fix a no-any lint error.
This commit is contained in:
parent
774f6d61f3
commit
42f827ba36
@ -87,6 +87,7 @@
|
||||
"@types/request": "^2.47.1",
|
||||
"@types/semver": "^5.5.0",
|
||||
"@types/source-map": "0.5.2",
|
||||
"@types/v8-profiler": "^0.0.5",
|
||||
"@types/webpack": "^4.4.11",
|
||||
"@types/webpack-dev-server": "^3.1.0",
|
||||
"@types/webpack-sources": "^0.1.5",
|
||||
|
@ -16,6 +16,8 @@ import { SemVer } from 'semver';
|
||||
import { Duplex } from 'stream';
|
||||
import { isWarningEnabled } from '../utilities/config';
|
||||
|
||||
import { Profiler } from 'v8-profiler';
|
||||
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
function _fromPackageJson(cwd?: string) {
|
||||
@ -43,7 +45,7 @@ function _fromPackageJson(cwd?: string) {
|
||||
|
||||
// Check if we need to profile this CLI run.
|
||||
if (process.env['NG_CLI_PROFILING']) {
|
||||
let profiler: any = null;
|
||||
let profiler: Profiler;
|
||||
try {
|
||||
profiler = require('v8-profiler-node8'); // tslint:disable-line:no-implicit-dependencies
|
||||
} catch (err) {
|
||||
|
@ -463,6 +463,12 @@
|
||||
version "1.0.1"
|
||||
resolved "https://codeload.github.com/quicktype/types-urijs/tar.gz/a23603a04e31e883a92244bff8515e3d841a8b98"
|
||||
|
||||
"@types/v8-profiler@^0.0.5":
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/v8-profiler/-/v8-profiler-0.0.5.tgz#2b9f0b7ba3294f5b177b66790607772910a195f9"
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/webpack-dev-server@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/webpack-dev-server/-/webpack-dev-server-3.1.0.tgz#1fae06ad346d2dd09bc5e34745723946458eed58"
|
||||
|
Loading…
x
Reference in New Issue
Block a user