From 776fc8093272ad29c20dfbcf8b7dfedfbc9bb2aa Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 29 May 2024 21:36:40 +0200 Subject: improve ts types --- node/src/astalify.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'node/src/astalify.ts') diff --git a/node/src/astalify.ts b/node/src/astalify.ts index 3bd00eb..bae6cc7 100644 --- a/node/src/astalify.ts +++ b/node/src/astalify.ts @@ -170,10 +170,12 @@ type BindableProps = { export type ConstructProps< Self extends { new(...args: any[]): any }, Props = unknown, - Signals = unknown + Signals extends Record> = Record > = { [Key in `on${string}`]: (self: Widget) => unknown -} & Partial & BindableProps, ...args: Signals[sig]) => unknown +}> & BindableProps