From c54ec181df34ddcc4ba30b95dd64791c1712271f Mon Sep 17 00:00:00 2001 From: okxiaoliang4 <353742991@qq.com> Date: Sun, 10 Jul 2022 22:55:40 +0800 Subject: [PATCH] fix(useTimestamp)!: rename type `TimestampOptions` to `UseTimestampOptions` --- packages/core/useTimestamp/component.ts | 4 ++-- packages/core/useTimestamp/index.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/useTimestamp/component.ts b/packages/core/useTimestamp/component.ts index 1e4aec31809..3d5160031c6 100644 --- a/packages/core/useTimestamp/component.ts +++ b/packages/core/useTimestamp/component.ts @@ -1,8 +1,8 @@ import { defineComponent, reactive } from 'vue-demi' -import type { TimestampOptions } from '@vueuse/core' +import type { UseTimestampOptions } from '@vueuse/core' import { useTimestamp } from '@vueuse/core' -export const UseTimestamp = defineComponent, 'controls'>>({ +export const UseTimestamp = defineComponent, 'controls'>>({ name: 'UseTimestamp', props: ['immediate', 'interval', 'offset'] as unknown as undefined, setup(props, { slots }) { diff --git a/packages/core/useTimestamp/index.ts b/packages/core/useTimestamp/index.ts index 2973e9eb372..00fbbd2d365 100644 --- a/packages/core/useTimestamp/index.ts +++ b/packages/core/useTimestamp/index.ts @@ -4,7 +4,7 @@ import type { Ref } from 'vue-demi' import { ref } from 'vue-demi' import { useRafFn } from '../useRafFn' -export interface TimestampOptions { +export interface UseTimestampOptions { /** * Expose more controls * @@ -40,9 +40,9 @@ export interface TimestampOptions { * @see https://vueuse.org/useTimestamp * @param options */ -export function useTimestamp(options?: TimestampOptions): Ref -export function useTimestamp(options: TimestampOptions): { timestamp: Ref } & Pausable -export function useTimestamp(options: TimestampOptions = {}) { +export function useTimestamp(options?: UseTimestampOptions): Ref +export function useTimestamp(options: UseTimestampOptions): { timestamp: Ref } & Pausable +export function useTimestamp(options: UseTimestampOptions = {}) { const { controls: exposeControls = false, offset = 0,