#"Type 'ExecutorFn' is not generic." It seems like it is to me?

4 messages · Page 1 of 1 (latest)

shy vesselBOT
#
bawdyinkslinger#0

Preview:```ts
type ExecutorFn = <T>(
a: (value?: T) => void,
rejbect: (reason?: T) => void
) => void

export default class Foo<T> {
private readonly _fn: ExecutorFn<T>

public constructor(executorFn: ExecutorFn<T>) {
this._fn = executorFn
}
}```

scenic sandal
#

!ts

shy vesselBOT
#
type ExecutorFn = <T>(
  a: (value?: T) => void,
  rejbect: (reason?: T) => void
) => void;


export default class Foo<T> {
  private readonly _fn: ExecutorFn<T>;
//                      ^^^^^^^^^^^^^
// Type 'ExecutorFn' is not generic.
  
  public constructor(executorFn: ExecutorFn<T>) {
//                               ^^^^^^^^^^^^^
// Type 'ExecutorFn' is not generic.
    this._fn = executorFn;
  }

}
scenic sandal
#

oh I get it