Skip to content

⬅️ Back to Table of Contents

📄 useMath

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 3
📑 Type Aliases 2

📚 Table of Contents

🛠️ File Location:

📂 packages/math/useMath/index.ts

📦 Imports

Name Source
ArgumentsType @vueuse/shared
Reactified @vueuse/shared
reactify @vueuse/shared

Functions

useMath(key: K, args: ArgumentsType<Reactified<Math[K], true>>): UseMathReturn<K>

Reactive Math methods.

See: https://vueuse.org/useMath

Tags: @__NO_SIDE_EFFECTS__

Raw JSDoc
/**
 * Reactive `Math` methods.
 *
 * @see https://vueuse.org/useMath
 *
 * @__NO_SIDE_EFFECTS__
 */

Calls:

  • complex_call_554
Code
export function useMath<K extends keyof Math>(
  key: K,
  ...args: ArgumentsType<Reactified<Math[K], true>>
): UseMathReturn<K> {
  return reactify(Math[key] as any)(...args) as UseMathReturn<K>
}

Type Aliases

UseMathKeys

type UseMathKeys = keyof { [K in keyof Math as Math[K] extends (...args: any) => any ? K : never]: unknown };

UseMathReturn<K extends keyof Math>

type UseMathReturn<K extends keyof Math> = ReturnType<Reactified<Math[K], true>>;

Generated by Syntax Scribe