mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
types(cli): fit typescript@4.1
This commit is contained in:
@@ -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');
|
||||
|
||||
|
@@ -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) => {
|
||||
|
@@ -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) => {
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user