You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, while Credentials, CredentialsArgs, TwitterStream, etc. are defined in TypeScript definition files, and included in the build, they cannot be imported without digging into the structure of the package:
For one, users can more easily figure out what is exported for public use through the index.ts file - there may be certain types/classes that aren't meant to be publicly exported that won't exist in here, but can be used internally. It also just cleans up the number of imports that a user might have for various parts of the package, without needing to know what the structure of the package looks like.
On a related note, it may be worth defining the files property in the package.json file which would send out the built files only - there's no need to pack up the src/*.ts files when consumers are actually using the build/*.js and build/*.d.ts files.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
Prerequisites
following:
Summary
Currently, while
Credentials
,CredentialsArgs
,TwitterStream
, etc. are defined in TypeScript definition files, and included in the build, they cannot be imported without digging into the structure of the package:With an
index.ts
file that exports these types/class definitions, it could simplify the importing structure alongside the main client:Motivation
For one, users can more easily figure out what is exported for public use through the
index.ts
file - there may be certain types/classes that aren't meant to be publicly exported that won't exist in here, but can be used internally. It also just cleans up the number of imports that a user might have for various parts of the package, without needing to know what the structure of the package looks like.On a related note, it may be worth defining the
files
property in thepackage.json
file which would send out the built files only - there's no need to pack up thesrc/*.ts
files when consumers are actually using thebuild/*.js
andbuild/*.d.ts
files.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: