types: remove unused type

This commit is contained in:
chenjiahan 2020-08-20 22:37:29 +08:00
parent 853417d470
commit 33fa443342
3 changed files with 4 additions and 42 deletions

View File

@ -1,5 +1,6 @@
import { isDef, isObject } from '.';
import { ObjectIndex } from './types';
type ObjectIndex = Record<string, any>;
const { hasOwnProperty } = Object.prototype;

View File

@ -1,5 +1,6 @@
import { inBrowser } from '..';
import { EventHandler } from '../types';
type EventHandler = (event: Event) => void;
// eslint-disable-next-line import/no-mutable-exports
export let supportsPassive = false;

View File

@ -1,40 +0,0 @@
import { VNode, CreateElement, RenderContext } from 'vue';
import { InjectOptions, PropsDefinition } from 'vue/types/options';
export type EventHandler = (event: Event) => void;
export type ObjectIndex = Record<string, any>;
export type ScopedSlot<Props = any> = (
props?: Props
) => VNode[] | VNode | undefined;
export type DefaultSlots = {
default?: ScopedSlot;
};
export type ScopedSlots = DefaultSlots & {
[key: string]: ScopedSlot | undefined;
};
export type ModelOptions = {
prop?: string;
event?: string;
};
export type DefaultProps = ObjectIndex;
export type FunctionComponent<
Props = DefaultProps,
PropDefs = PropsDefinition<Props>
> = {
(
h: CreateElement,
props: Props,
slots: ScopedSlots,
context: RenderContext<Props>
): VNode | undefined;
props?: PropDefs;
model?: ModelOptions;
inject?: InjectOptions;
};