From 86bc5fa3b5fdf10bf076ee07dc6765bcfecd0016 Mon Sep 17 00:00:00 2001 From: Oleg Solomko Date: Thu, 6 Feb 2025 23:02:13 -0800 Subject: [PATCH] improve `typeCheck` utility (#239890) --- src/vs/base/common/types.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/types.ts b/src/vs/base/common/types.ts index ccaf6ef88f5a8..deb489504aadf 100644 --- a/src/vs/base/common/types.ts +++ b/src/vs/base/common/types.ts @@ -202,10 +202,9 @@ export function assertOneOf( } /** - * Simple compile-time type check function to validate a type of - * a provided object. + * Compile-time type check of a variable. */ -export function typeCheck(_thing: T): asserts _thing is T { } +export function typeCheck(_thing: NoInfer): void { } const hasOwnProperty = Object.prototype.hasOwnProperty;