From 0f145548a8c26f7761d33d274e5988e69ce2251e Mon Sep 17 00:00:00 2001 From: JustinChou Date: Wed, 1 Aug 2018 13:05:01 +0800 Subject: [PATCH] The argument of followsFrom function should support Span (#109) * Fix params type error. The followsFrom function should have alternative args type of `Span`. --- src/functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions.ts b/src/functions.ts index 64b5a3a..862dd28 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -25,7 +25,7 @@ export function childOf(spanContext: SpanContext | Span): Reference { * reference. * @return a REFERENCE_FOLLOWS_FROM reference pointing to `spanContext` */ -export function followsFrom(spanContext: SpanContext): Reference { +export function followsFrom(spanContext: SpanContext | Span): Reference { // Allow the user to pass a Span instead of a SpanContext if (spanContext instanceof Span) { spanContext = spanContext.context();