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

Remove export * #272

Closed
grant opened this issue Jul 24, 2020 · 1 comment · Fixed by #297
Closed

Remove export * #272

grant opened this issue Jul 24, 2020 · 1 comment · Fixed by #297
Labels
chore/refactor Refactoring and other non-functional changes to module code version/3.x Issues related to the 3.0 release of this library

Comments

@grant
Copy link
Member

grant commented Jul 24, 2020

Expected

export * is seen in a few files. This is usually a bad practice because we can't see what we export and we can't click to definition.

Just export the class/const with the definition.

Actual

A few files have unnecessary export * patterns.

@lholmquist lholmquist added chore/refactor Refactoring and other non-functional changes to module code version/3.x Issues related to the 3.0 release of this library labels Jul 27, 2020
@grant
Copy link
Member Author

grant commented Jul 31, 2020

Specifically here:

https://github.com/cloudevents/sdk-javascript/blob/3d82fb629182edaee11e571ea895a5f8a7456a0e/src/transport/index.ts

It's actually causing issues with my build for some reason:

node_modules/cloudevents/dist/transport/index.d.ts:3:10 - error TS1005: 'from' expected.

3 export * as http from "./http/headers";
           ~~

node_modules/cloudevents/dist/transport/index.d.ts:3:10 - error TS1141: String literal expected.

3 export * as http from "./http/headers";
           ~~

node_modules/cloudevents/dist/transport/index.d.ts:3:13 - error TS1005: ';' expected.

3 export * as http from "./http/headers";
              ~~~~

node_modules/cloudevents/dist/transport/index.d.ts:3:13 - error TS2304: Cannot find name 'http'.

3 export * as http from "./http/headers";
              ~~~~

node_modules/cloudevents/dist/transport/index.d.ts:3:18 - error TS1005: ';' expected.

3 export * as http from "./http/headers";
                   ~~~~

node_modules/cloudevents/dist/transport/index.d.ts:3:18 - error TS2304: Cannot find name 'from'.

3 export * as http from "./http/headers";
                   ~~~~

node_modules/cloudevents/dist/transport/index.d.ts:3:23 - error TS1005: ';' expected.

3 export * as http from "./http/headers";
                        ~~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore/refactor Refactoring and other non-functional changes to module code version/3.x Issues related to the 3.0 release of this library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants