Skip to content

Commit

Permalink
build: enable importHelpers to avoid duplicating helpers
Browse files Browse the repository at this point in the history
In ES5 code, TypeScript relies on specific helpers (such as `__spreadArrays()`) to
support ES2015+ features. These helpers can be either imported from `tslib`
(by enabling the `importHelpers` TS compiler option) or inserted inline (by disabling
both `importHelpers` and `noEmitHelpers`, which are both initially set to `false`).

Currently, the helpers are directly inserted into each JavaScript module, resulting in a
larger final size compared to importing them from the `tslib` library. Therefore, in this
commit, we enable the `importHelpers` option and include `tslib` as a dependency.
  • Loading branch information
arturovt committed May 29, 2024
1 parent f2f7d9b commit 1d4d232
Show file tree
Hide file tree
Showing 100 changed files with 336 additions and 1,763 deletions.
2 changes: 1 addition & 1 deletion dist/typesense.js.map

Large diffs are not rendered by default.

33 changes: 4 additions & 29 deletions lib/Typesense.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Typesense.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 6 additions & 44 deletions lib/Typesense/Alias.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Typesense/Alias.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 5 additions & 40 deletions lib/Typesense/Aliases.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Typesense/Aliases.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions lib/Typesense/Analytics.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Typesense/Analytics.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 3 additions & 38 deletions lib/Typesense/AnalyticsEvents.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Typesense/AnalyticsEvents.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1d4d232

Please sign in to comment.