Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript definition errors #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

laptou
Copy link

@laptou laptou commented Jul 21, 2022

Current TypeScript definitions do not compile:

../../node_modules/koa-easy-ws/index.d.ts(5,66): error TS2706: Required type parameters may not follow optional type parameters.
../../node_modules/koa-easy-ws/index.d.ts(6,3): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
../../node_modules/koa-easy-ws/index.d.ts(6,4): error TS2693: 'PropertyName' only refers to a type, but is being used as a value here.
../../node_modules/koa-easy-ws/index.d.ts(7,3): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
../../node_modules/koa-easy-ws/index.d.ts(7,4): error TS2693: 'ServerPropertyName' only refers to a type, but is being used as a value here.
../../node_modules/koa-easy-ws/index.d.ts(14,64): error TS2706: Required type parameters may not follow optional type parameters.

This change fixes all of these errors.

Current TypeScript definitions do not compile:
> ../../node_modules/koa-easy-ws/index.d.ts(5,66): error TS2706: Required type parameters may not follow optional type parameters. 
> ../../node_modules/koa-easy-ws/index.d.ts(6,3): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. 
> ../../node_modules/koa-easy-ws/index.d.ts(6,4): error TS2693: 'PropertyName' only refers to a type, but is being used as a value here. 
> ../../node_modules/koa-easy-ws/index.d.ts(7,3): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type. 
> ../../node_modules/koa-easy-ws/index.d.ts(7,4): error TS2693: 'ServerPropertyName' only refers to a type, but is being used as a value here.
> ../../node_modules/koa-easy-ws/index.d.ts(14,64): error TS2706: Required type parameters may not follow optional type parameters.

This change fixes all of these errors.
@Rikthepixel
Copy link

Heya, it seems that this library isn't actively maintained anymore. I decided to fork it and am planning to maintain it. I applied your fixes to the fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants