MCPcopy Create free account
hub / github.com/TanStack/router / task

Method task

packages/start-plugin-core/src/queue.ts:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 add(fn: () => Promise<T> | T, { priority }: { priority?: boolean } = {}) {
69 return new Promise<any>((resolve, reject) => {
70 const task = () =>
71 Promise.resolve(fn())
72 .then((res) => {
73 resolve(res)
74 return res
75 })
76 .catch((err) => {
77 reject(err)
78 throw err
79 })
80 if (priority) {
81 this.pending.unshift(task)
82 } else {

Callers 1

tryNavigationFunction · 0.80

Calls 5

resolveMethod · 0.80
catchMethod · 0.65
thenMethod · 0.65
fnFunction · 0.50
resolveFunction · 0.50

Tested by

no test coverage detected