Skip to content

Remove export * #272

Closed
Closed

Description

@grant

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.

Activity

  1. added
    chore/refactorRefactoring and other non-functional changes to module code
    version/3.xIssues related to the 3.0 release of this library
    on Jul 27, 2020
  2. grant commented on Jul 31, 2020

    @grant
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    chore/refactorRefactoring and other non-functional changes to module codeversion/3.xIssues related to the 3.0 release of this library

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions