Skip to content

Commit

Permalink
fix(useTimestamp)!: rename type TimestampOptions to `UseTimestampOp…
Browse files Browse the repository at this point in the history
…tions` (#1892)
  • Loading branch information
okxiaoliang4 committed Jul 13, 2022
1 parent d7052ab commit 98985be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 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<Omit<TimestampOptions<true>, 'controls'>>({
export const UseTimestamp = defineComponent<Omit<UseTimestampOptions<true>, 'controls'>>({
name: 'UseTimestamp',
props: ['immediate', 'interval', 'offset'] as unknown as undefined,
setup(props, { slots }) {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/useTimestamp/index.ts
Expand Up @@ -4,7 +4,7 @@ import type { Ref } from 'vue-demi'
import { ref } from 'vue-demi'
import { useRafFn } from '../useRafFn'

export interface TimestampOptions<Controls extends boolean> {
export interface UseTimestampOptions<Controls extends boolean> {
/**
* Expose more controls
*
Expand Down Expand Up @@ -40,9 +40,9 @@ export interface TimestampOptions<Controls extends boolean> {
* @see https://vueuse.org/useTimestamp
* @param options
*/
export function useTimestamp(options?: TimestampOptions<false>): Ref<number>
export function useTimestamp(options: TimestampOptions<true>): { timestamp: Ref<number> } & Pausable
export function useTimestamp(options: TimestampOptions<boolean> = {}) {
export function useTimestamp(options?: UseTimestampOptions<false>): Ref<number>
export function useTimestamp(options: UseTimestampOptions<true>): { timestamp: Ref<number> } & Pausable
export function useTimestamp(options: UseTimestampOptions<boolean> = {}) {
const {
controls: exposeControls = false,
offset = 0,
Expand Down

0 comments on commit 98985be

Please sign in to comment.