Closed
Description
This causes a TS1003 error on the comma after the third parameter:
export type PriceLookup = (
tokenAddress: string,
block: i32,
currentPool: string,
) => string | null;
ERROR TS1003: Identifier expected.
;; :
;; 4 │ currentPool: string,
;; │ ^
;; └─ in module.ts(4,22)
;;
;; ERROR TS1012: Unexpected token.
;; :
;; 4 │ currentPool: string,
;; │ ^
;; └─ in module.ts(4,22)
This compiles fine:
export type PriceLookup2 = (tokenAddress: string, block: i32, currentPool: string) => string | null;
Functionally, there is no difference between these. However, eslint/prettier will often cause example 2 to be wrapped into the format of example 1, so it would be nice for this to not error.