types: using unknown instead of any (#8152)

* types: using unknown instead of any

* chore: UnknownProp
This commit is contained in:
neverland
2021-02-14 12:37:02 +08:00
committed by GitHub
parent 393b2a256f
commit 08e928111b
23 changed files with 81 additions and 56 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
import { watch, onMounted, onUnmounted, PropType } from 'vue';
import { watch, PropType, onMounted, onUnmounted, CSSProperties } from 'vue';
// Utils
import { createNamespace, isDef } from '../utils';
import { createNamespace, isDef, UnknownProp } from '../utils';
import { lockClick } from './lock-click';
// Components
@@ -19,13 +19,13 @@ export default createComponent({
icon: String,
show: Boolean,
message: [Number, String],
className: null,
className: UnknownProp,
iconPrefix: String,
lockScroll: Boolean,
loadingType: String as PropType<LoadingType>,
forbidClick: Boolean,
overlayClass: null,
overlayStyle: Object,
overlayClass: UnknownProp,
overlayStyle: Object as PropType<CSSProperties>,
closeOnClick: Boolean,
closeOnClickOverlay: Boolean,
type: {
+2 -2
View File
@@ -15,13 +15,13 @@ export type ToastOptions = {
duration?: number;
teleport?: TeleportProps['to'];
position?: ToastPosition;
className?: any;
className?: unknown;
transition?: string;
iconPrefix?: string;
loadingType?: LoadingType;
forbidClick?: boolean;
closeOnClick?: boolean;
overlayClass?: any;
overlayClass?: unknown;
overlayStyle?: Record<string, any>;
closeOnClickOverlay?: boolean;
};