diff --git a/src/utilityFunctions/misc.ts b/src/utilityFunctions/misc.ts index fab2e2e..b710843 100644 --- a/src/utilityFunctions/misc.ts +++ b/src/utilityFunctions/misc.ts @@ -32,9 +32,10 @@ export const unsafeCast = (_value: unknown): asserts _value is T => { /** * converts the given `value` to a string, preserving its value at compiletime where possible */ -export const toStringType = ( - value: T, -): T extends TemplateLiteralStringable ? ToString : string => value.toString() as never +export const toStringType: { + (value: T): ToString + (value: T): string +} = (value: Stringable) => value.toString() as never /** * asserts that a value matches the given type