yoursunny / NDNts

NDN libraries for the Modern Web
https://ndnts-docs.ndn.today
ISC License
31 stars 9 forks source link

Getter and setter accessors do not agree in visibility. #8

Closed killerdbob closed 2 years ago

killerdbob commented 2 years ago

when I use svchat, ndnts show up a declare bug, and I change get state(): L3Face.State; to private get state(): L3Face.State;, bug disappear.

problem:

Error: node_modules/@ndn/l3face/lib/l3face.d.ts:28:9 - error TS2379: Getter and setter accessors do not agree in visibility.

28     get state(): L3Face.State;
           ~~~~~

Error: node_modules/@ndn/l3face/lib/l3face.d.ts:29:17 - error TS2379: Getter and setter accessors do not agree in visibility.

29     private set state(value);
                   ~~~~~
yoursunny commented 2 years ago

when I use svchat

What is this?

killerdbob commented 2 years ago

when I use svchat

What is this?

https://github.com/pulsejet/svchat

yoursunny commented 2 years ago

SvChat repository is using TypeScript 4.1: https://github.com/pulsejet/svchat/blob/19b1abe9b9f45be2d94b9d8c6e095d9a1a89bc97/package.json#L51

Having different visibility for getter and setter is introduced in TypeScript 4.3: https://github.com/microsoft/TypeScript/pull/42425

Looks like @pulsejet needs to upgrade to latest TypeScript. Please report an issue in their repository, as this is not my bug.

If you are looking for a chat app, see also: https://github.com/yoursunny/NDNts-chat

killerdbob commented 2 years ago

Thank you