Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(useTimestamp)!: rename type TimestampOptions to UseTimestampOptions #1892

Merged
merged 1 commit into from Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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