Skip to content

Commit

Permalink
fix(composables): type fix . useMeasure could receive a undefined `…
Browse files Browse the repository at this point in the history
…options` param.
  • Loading branch information
s3xysteak committed May 9, 2024
1 parent fb296f8 commit 2821452
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/composables/useMeasure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ type UseMeasureType = 'area' | 'distance' | 'height'
type UseMeasureOptions = AreaOptions | DistanceOptions | HeightOptions
type UseMeasureReturns = AreaReturn | DistanceReturn | HeightReturn

export function useMeasure(type: 'area', options: AreaOptions): AreaReturn
export function useMeasure(type: 'distance', options: DistanceOptions): DistanceReturn
export function useMeasure(type: 'height', options: HeightOptions): HeightReturn
export function useMeasure(type: UseMeasureType, options: UseMeasureOptions): UseMeasureReturns {
export function useMeasure(type: 'area', options?: AreaOptions): AreaReturn
export function useMeasure(type: 'distance', options?: DistanceOptions): DistanceReturn
export function useMeasure(type: 'height', options?: HeightOptions): HeightReturn
export function useMeasure(type: UseMeasureType, options?: UseMeasureOptions): UseMeasureReturns {
const typeMap = {
area,
distance,
Expand Down

0 comments on commit 2821452

Please sign in to comment.