refactor(struct): improve tree-shaking

This commit is contained in:
Simon Chan 2024-11-10 17:37:31 +08:00
parent 70b0d3e5d8
commit c1dc802364
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
15 changed files with 102 additions and 93 deletions

View file

@ -25,7 +25,7 @@ export interface String {
): Field<string, KOmitInit, KS>;
}
// This is required for Rollup tree-shaking to work.
// Rollup doesn't support `/* #__NO_SIDE_EFFECTS__ */ export const a = () => {}
/* #__NO_SIDE_EFFECTS__ */
function _string(
lengthOrField: string | number | BufferLengthConverter<string, unknown>,