fix: ts error

This commit is contained in:
Amour1688 2020-10-01 20:57:03 +08:00
parent 81e15834c2
commit 2fd04595bf
9 changed files with 18 additions and 7 deletions

View File

@ -16,7 +16,7 @@ export type ClassValue =
| boolean;
function classNames(...args: ClassValue[]): string {
const classes = [];
const classes: string[] = [];
for (let i = 0; i < args.length; i++) {
const value = args[i];
if (!value) {

View File

@ -1,11 +1,13 @@
import { PropType } from 'vue';
import isPlainObject from 'lodash-es/isPlainObject';
import { toType, getType, isFunction, validateType, isInteger, isArray, warn } from './utils';
interface BaseTypes {
type: any;
def: Function;
validator: Function;
}
// interface BaseTypes {
// type: any;
// def: Function;
// validator: Function;
// }
const PropTypes = {
get any() {
return toType('any', {

9
examples/App.tsx Normal file
View File

@ -0,0 +1,9 @@
import { defaultTo } from 'lodash-es';
import Empty from '../components/empty';
import '../components/empty/style';
export default {
render() {
return <Empty />;
},
};

View File

@ -12,7 +12,7 @@
"jsx": "preserve",
"noUnusedParameters": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"noImplicitAny": false,
"target": "es6",
"lib": ["dom", "es2017"],
"skipLibCheck": true