You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'.
12
+
!!! error TS2322: 'TFunction' could be instantiated with an arbitrary type which could be unrelated to 'typeof decoratorFunc'.
11
13
~~~~~~~~~~
12
14
!!! error TS2507: Type 'TFunction' is not a constructor function type.
13
15
!!! related TS2735 tests/cases/compiler/baseConstraintOfDecorator.ts:1:31: Did you mean for 'TFunction' to be constrained to type 'new (...args: any[]) => unknown'?
14
16
constructor(...args: any[]) {
15
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17
super(...args);
17
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
18
_instanceModifier(this, args);
19
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
19
}
21
-
~~~~~~~~~
22
20
};
23
-
~~~~~~
24
-
!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'.
25
-
!!! error TS2322: 'TFunction' could be instantiated with an arbitrary type which could be unrelated to 'typeof decoratorFunc'.
export function makeNewChannel<T extends ChannelType>(type: T): NewChannel<ChannelOfType<T>> {
54
54
const localChannelId = `blahblahblah`;
55
55
return { type, localChannelId };
56
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
56
+
~~~~~~
57
57
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'NewChannel<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>>'.
58
58
!!! error TS2322: Type '{ type: T; localChannelId: string; }' is not assignable to type 'Pick<ChannelOfType<T, TextChannel> | ChannelOfType<T, EmailChannel>, "type">'.
59
59
!!! error TS2322: Types of property 'type' are incompatible.
0 commit comments