Closed patroza closed 1 year ago
ReadonlyArray is a problem too it seems, the one defined by TS, trying to use with:
ReadonlyArray
{ "definitionName": "make", "definitionKind": "const", "extensions": [ { "kind": "static", "typeName": "fp-ts/data/ReadonlyArray.Ops", "name": "make" } ] },
global:
declare global { /** * @tsplus type ReadonlyArray * @tsplus type Iterable * @tsplus companion fp-ts/data/ReadonlyArray.Ops * @tsplus companion ReadonlyArray.Ops */ interface ReadonlyArray<T> {} }
export const nea = ReadonlyArray.make(1)
error: ReadonlyArray' only refers to a type, but is being used as a value here. though maybe the companion trick only works via the json declaration?
ReadonlyArray' only refers to a type, but is being used as a value here.
It does work when I create a file and do this:
/** * @tsplus type ReadonlyArray * @tsplus type Iterable * @tsplus companion fp-ts/data/ReadonlyArray.Ops * @tsplus companion ReadonlyArray.Ops */ export type ROA<A> = ReadonlyArray<A> export type { ROA as ReadonlyArray }
and then instead import from there
@0x706b this seems to work well now, thanks!
ReadonlyArray
is a problem too it seems, the one defined by TS, trying to use with:global:
error:
ReadonlyArray' only refers to a type, but is being used as a value here.
though maybe the companion trick only works via the json declaration?It does work when I create a file and do this:
and then instead import from there