@@ -48,13 +48,6 @@ const defaultOptions = {
|
||||
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
||||
} as const
|
||||
|
||||
const makeWithDefaults = (): Component<any, any, any> => Object.assign(
|
||||
Object.setPrototypeOf(function() {}, ComponentProto), {
|
||||
finalizerExecutionMode: "sync",
|
||||
finalizerExecutionStrategy: ExecutionStrategy.sequential,
|
||||
}
|
||||
)
|
||||
|
||||
const nonReactiveTags = [Tracer.ParentSpan] as const
|
||||
|
||||
|
||||
@@ -296,7 +289,7 @@ export const make: (
|
||||
if (typeof spanNameOrBody !== "string") {
|
||||
const displayName = displayNameFromBody(spanNameOrBody)
|
||||
return Object.setPrototypeOf(
|
||||
Object.assign(function() {}, {
|
||||
Object.assign(function() {}, defaultOptions, {
|
||||
body: displayName
|
||||
? Effect.fn(displayName)(spanNameOrBody as any, ...pipeables as [])
|
||||
: Effect.fn(spanNameOrBody as any, ...pipeables),
|
||||
@@ -308,7 +301,7 @@ export const make: (
|
||||
else {
|
||||
const spanOptions = pipeables[0]
|
||||
return (body: any, ...pipeables: any[]) => Object.setPrototypeOf(
|
||||
Object.assign(function() {}, {
|
||||
Object.assign(function() {}, defaultOptions, {
|
||||
body: Effect.fn(spanNameOrBody, spanOptions)(body, ...pipeables as []),
|
||||
displayName: displayNameFromBody(body) ?? spanNameOrBody,
|
||||
}),
|
||||
@@ -321,7 +314,7 @@ export const makeUntraced: make.Gen & make.NonGen = (
|
||||
body: Function,
|
||||
...pipeables: any[]
|
||||
) => Object.setPrototypeOf(
|
||||
Object.assign(function() {}, {
|
||||
Object.assign(function() {}, defaultOptions, {
|
||||
body: Effect.fnUntraced(body as any, ...pipeables as []),
|
||||
displayName: displayNameFromBody(body),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user