types(cli): fit typescript@4.1

This commit is contained in:
chenjiahan 2020-11-21 21:15:10 +08:00
parent 265ca82686
commit 23e647805a
5 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ import { readFileSync, removeSync, outputFileSync } from 'fs-extra';
import { replaceExt } from '../common';
import { replaceCssImport } from '../common/css';
export function compileJs(filePath: string): Promise<undefined> {
export function compileJs(filePath: string): Promise<void> {
return new Promise((resolve, reject) => {
let code = readFileSync(filePath, 'utf-8');

View File

@ -2,7 +2,7 @@ import webpack from 'webpack';
import { getPackageConfig } from '../config/webpack.package';
export async function compilePackage(isMinify: boolean) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const config = getPackageConfig(isMinify);
webpack(config, (err, stats) => {

View File

@ -54,7 +54,7 @@ function watch() {
}
function build() {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
const config = getSitePrdConfig();
webpack(config, (err, stats) => {

View File

@ -93,7 +93,7 @@ function getSequence(components: string[], depsMap: DepsMap) {
export async function genStyleDepsMap() {
const components = getComponents();
return new Promise(resolve => {
return new Promise<void>(resolve => {
clearDepsCache();
const map = {} as DepsMap;

View File

@ -11297,9 +11297,9 @@ typedarray-to-buffer@^3.1.5:
is-typedarray "^1.0.0"
typescript@^4.0.0:
version "4.0.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2"
integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==
version "4.1.2"
resolved "https://registry.npm.taobao.org/typescript/download/typescript-4.1.2.tgz?cache=0&sync_timestamp=1605941213950&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftypescript%2Fdownload%2Ftypescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
integrity sha1-Y2nvIlFv5eEDBKrlpcSGLbVTgOk=
uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"