typescript-go
typescript-go copied to clipboard
TS4094 exported anonymous class type may not be private or protected
Steps to reproduce
- https://github.com/nil1511/wavesurfer-tsgo
- bun install
index.ts
import type RegionsPlugin from 'wavesurfer.js/dist/plugins/regions.js';
import type { Region } from 'wavesurfer.js/dist/plugins/regions.js';
export const getRegionWithId = (
regions: RegionsPlugin,
id: string
): Region | undefined => regions.getRegions().find((r) => r.id === id);
node_modules/wavesurfer.js/dist/plugins/regions.d.ts
// failing since SingleRegion is not exported.
declare class SingleRegion extends EventEmitter<RegionEvents> implements Region {..}
export type Region = SingleRegion;
Behavior with [email protected]
bun run tsc successful without any error
Behavior with tsgo
bun run tsgo
$ tsgo
index.ts:5:14 - error TS4094: Property 'addResizeHandles' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'clampPosition' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'contentBlurListener' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'contentClickListener' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'emit' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'initElement' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'initMouseEvents' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'isRemoved' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'listeners' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'numberOfChannels' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'onContentClick' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'onEndResizing' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'onMove' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'onResize' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'removeResizeHandles' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'renderPosition' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'setPart' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'toggleCursor' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - error TS4094: Property 'totalDuration' of exported anonymous class type may not be private or protected.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
index.ts:5:14 - Add a type annotation to the variable getRegionWithId.
5 export const getRegionWithId = (
~~~~~~~~~~~~~~~
Found 19 errors in the same file, starting at: index.ts:5