@bufbuild/protobuf 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/cjs/codegen-info.js +2 -0
  2. package/dist/cjs/google/protobuf/any_pb.js +4 -4
  3. package/dist/cjs/google/protobuf/api_pb.js +4 -4
  4. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +4 -4
  5. package/dist/cjs/google/protobuf/descriptor_pb.js +106 -28
  6. package/dist/cjs/google/protobuf/duration_pb.js +1 -1
  7. package/dist/cjs/google/protobuf/empty_pb.js +1 -1
  8. package/dist/cjs/google/protobuf/field_mask_pb.js +2 -2
  9. package/dist/cjs/google/protobuf/source_context_pb.js +1 -1
  10. package/dist/cjs/google/protobuf/struct_pb.js +5 -5
  11. package/dist/cjs/google/protobuf/timestamp_pb.js +2 -2
  12. package/dist/cjs/google/protobuf/type_pb.js +27 -6
  13. package/dist/cjs/google/protobuf/wrappers_pb.js +9 -9
  14. package/dist/cjs/index.js +0 -3
  15. package/dist/cjs/private/binary-format-common.js +44 -6
  16. package/dist/cjs/private/names.js +128 -97
  17. package/dist/cjs/proto-base64.js +2 -10
  18. package/dist/esm/codegen-info.js +3 -1
  19. package/dist/esm/create-descriptor-set.js +1 -1
  20. package/dist/esm/google/protobuf/any_pb.js +5 -4
  21. package/dist/esm/google/protobuf/api_pb.js +7 -4
  22. package/dist/esm/google/protobuf/compiler/plugin_pb.js +8 -4
  23. package/dist/esm/google/protobuf/descriptor_pb.js +132 -27
  24. package/dist/esm/google/protobuf/duration_pb.js +2 -1
  25. package/dist/esm/google/protobuf/empty_pb.js +2 -1
  26. package/dist/esm/google/protobuf/field_mask_pb.js +3 -2
  27. package/dist/esm/google/protobuf/source_context_pb.js +2 -1
  28. package/dist/esm/google/protobuf/struct_pb.js +8 -5
  29. package/dist/esm/google/protobuf/timestamp_pb.js +3 -2
  30. package/dist/esm/google/protobuf/type_pb.js +32 -6
  31. package/dist/esm/google/protobuf/wrappers_pb.js +18 -9
  32. package/dist/esm/index.js +1 -4
  33. package/dist/esm/private/binary-format-common.js +45 -7
  34. package/dist/esm/private/message-type.js +1 -1
  35. package/dist/esm/private/names.js +125 -96
  36. package/dist/esm/private/util-common.js +1 -1
  37. package/dist/esm/proto-base64.js +2 -10
  38. package/dist/types/codegen-info.d.ts +3 -1
  39. package/dist/types/google/protobuf/any_pb.d.ts +3 -3
  40. package/dist/types/google/protobuf/api_pb.d.ts +1 -1
  41. package/dist/types/google/protobuf/descriptor_pb.d.ts +107 -3
  42. package/dist/types/google/protobuf/struct_pb.d.ts +1 -1
  43. package/dist/types/google/protobuf/timestamp_pb.d.ts +1 -1
  44. package/dist/types/google/protobuf/type_pb.d.ts +19 -1
  45. package/dist/types/index.d.ts +5 -4
  46. package/dist/types/private/binary-format-common.d.ts +3 -2
  47. package/dist/types/private/json-format-common.d.ts +2 -1
  48. package/dist/types/private/message-type.d.ts +2 -1
  49. package/dist/types/private/names.d.ts +9 -0
  50. package/dist/types/private/scalars.d.ts +2 -1
  51. package/dist/types/proto-base64.d.ts +1 -9
  52. package/package.json +2 -2
@@ -87,15 +87,7 @@ export const protoBase64 = {
87
87
  return bytes.subarray(0, bytePos);
88
88
  },
89
89
  /**
90
- * Decodes a base64 string to a byte array.
91
- *
92
- * - ignores white-space, including line breaks and tabs
93
- * - allows inner padding (can decode concatenated base64 strings)
94
- * - does not require padding
95
- * - understands base64url encoding:
96
- * "-" instead of "+",
97
- * "_" instead of "/",
98
- * no padding
90
+ * Encode a byte array to a base64 string.
99
91
  */
100
92
  enc(bytes) {
101
93
  let base64 = "", groupPos = 0, // position in base64 group
@@ -121,7 +113,7 @@ export const protoBase64 = {
121
113
  break;
122
114
  }
123
115
  }
124
- // padding required?
116
+ // add output padding
125
117
  if (groupPos) {
126
118
  base64 += encTable[p];
127
119
  base64 += "=";
@@ -1,4 +1,4 @@
1
- import { localName } from "./private/names.js";
1
+ import { localName, safeIdentifier, safeObjectProperty } from "./private/names.js";
2
2
  import { getUnwrappedFieldType } from "./private/field-wrapper.js";
3
3
  import { scalarDefaultValue } from "./private/scalars.js";
4
4
  import { reifyWkt } from "./private/reify-wkt.js";
@@ -10,6 +10,8 @@ interface CodegenInfo {
10
10
  readonly wktSourceFiles: readonly string[];
11
11
  readonly scalarDefaultValue: typeof scalarDefaultValue;
12
12
  readonly reifyWkt: typeof reifyWkt;
13
+ readonly safeIdentifier: typeof safeIdentifier;
14
+ readonly safeObjectProperty: typeof safeObjectProperty;
13
15
  }
14
16
  type RuntimeSymbolName = "proto2" | "proto3" | "Message" | "PartialMessage" | "PlainMessage" | "FieldList" | "MessageType" | "BinaryReadOptions" | "BinaryWriteOptions" | "JsonReadOptions" | "JsonWriteOptions" | "JsonValue" | "JsonObject" | "protoInt64" | "ScalarType" | "MethodKind" | "MethodIdempotency" | "IMessageTypeRegistry";
15
17
  type RuntimeSymbolInfo = {
@@ -36,7 +36,7 @@ import type { BinaryReadOptions } from "../../binary-format.js";
36
36
  * foo = any.unpack(Foo.getDefaultInstance());
37
37
  * }
38
38
  *
39
- * Example 3: Pack and unpack a message in Python.
39
+ * Example 3: Pack and unpack a message in Python.
40
40
  *
41
41
  * foo = Foo(...)
42
42
  * any = Any()
@@ -46,7 +46,7 @@ import type { BinaryReadOptions } from "../../binary-format.js";
46
46
  * any.Unpack(foo)
47
47
  * ...
48
48
  *
49
- * Example 4: Pack and unpack a message in Go
49
+ * Example 4: Pack and unpack a message in Go
50
50
  *
51
51
  * foo := &pb.Foo{...}
52
52
  * any, err := anypb.New(foo)
@@ -66,7 +66,7 @@ import type { BinaryReadOptions } from "../../binary-format.js";
66
66
  * name "y.z".
67
67
  *
68
68
  * JSON
69
- *
69
+ * ====
70
70
  * The JSON representation of an `Any` value uses the regular
71
71
  * representation of the deserialized, embedded message, with an
72
72
  * additional field `@type` which contains the type URL. Example:
@@ -197,7 +197,7 @@ export declare class Method extends Message<Method> {
197
197
  * The mixin construct implies that all methods in `AccessControl` are
198
198
  * also declared with same name and request/response types in
199
199
  * `Storage`. A documentation generator or annotation processor will
200
- * see the effective `Storage.GetAcl` method after inheriting
200
+ * see the effective `Storage.GetAcl` method after inherting
201
201
  * documentation and annotations as follows:
202
202
  *
203
203
  * service Storage {
@@ -242,6 +242,23 @@ export declare class ExtensionRangeOptions extends Message<ExtensionRangeOptions
242
242
  * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
243
243
  */
244
244
  uninterpretedOption: UninterpretedOption[];
245
+ /**
246
+ * go/protobuf-stripping-extension-declarations
247
+ * Like Metadata, but we use a repeated field to hold all extension
248
+ * declarations. This should avoid the size increases of transforming a large
249
+ * extension range into small ranges in generated binaries.
250
+ *
251
+ * @generated from field: repeated google.protobuf.ExtensionRangeOptions.Declaration declaration = 2;
252
+ */
253
+ declaration: ExtensionRangeOptions_Declaration[];
254
+ /**
255
+ * The verification state of the range.
256
+ * TODO(b/278783756): flip the default to DECLARATION once all empty ranges
257
+ * are marked as UNVERIFIED.
258
+ *
259
+ * @generated from field: optional google.protobuf.ExtensionRangeOptions.VerificationState verification = 3 [default = UNVERIFIED];
260
+ */
261
+ verification?: ExtensionRangeOptions_VerificationState;
245
262
  constructor(data?: PartialMessage<ExtensionRangeOptions>);
246
263
  static readonly runtime: typeof proto2;
247
264
  static readonly typeName = "google.protobuf.ExtensionRangeOptions";
@@ -251,6 +268,79 @@ export declare class ExtensionRangeOptions extends Message<ExtensionRangeOptions
251
268
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtensionRangeOptions;
252
269
  static equals(a: ExtensionRangeOptions | PlainMessage<ExtensionRangeOptions> | undefined, b: ExtensionRangeOptions | PlainMessage<ExtensionRangeOptions> | undefined): boolean;
253
270
  }
271
+ /**
272
+ * The verification state of the extension range.
273
+ *
274
+ * @generated from enum google.protobuf.ExtensionRangeOptions.VerificationState
275
+ */
276
+ export declare enum ExtensionRangeOptions_VerificationState {
277
+ /**
278
+ * All the extensions of the range must be declared.
279
+ *
280
+ * @generated from enum value: DECLARATION = 0;
281
+ */
282
+ DECLARATION = 0,
283
+ /**
284
+ * @generated from enum value: UNVERIFIED = 1;
285
+ */
286
+ UNVERIFIED = 1
287
+ }
288
+ /**
289
+ * @generated from message google.protobuf.ExtensionRangeOptions.Declaration
290
+ */
291
+ export declare class ExtensionRangeOptions_Declaration extends Message<ExtensionRangeOptions_Declaration> {
292
+ /**
293
+ * The extension number declared within the extension range.
294
+ *
295
+ * @generated from field: optional int32 number = 1;
296
+ */
297
+ number?: number;
298
+ /**
299
+ * The fully-qualified name of the extension field. There must be a leading
300
+ * dot in front of the full name.
301
+ *
302
+ * @generated from field: optional string full_name = 2;
303
+ */
304
+ fullName?: string;
305
+ /**
306
+ * The fully-qualified type name of the extension field. Unlike
307
+ * Metadata.type, Declaration.type must have a leading dot for messages
308
+ * and enums.
309
+ *
310
+ * @generated from field: optional string type = 3;
311
+ */
312
+ type?: string;
313
+ /**
314
+ * Deprecated. Please use "repeated".
315
+ *
316
+ * @generated from field: optional bool is_repeated = 4 [deprecated = true];
317
+ * @deprecated
318
+ */
319
+ isRepeated?: boolean;
320
+ /**
321
+ * If true, indicates that the number is reserved in the extension range,
322
+ * and any extension field with the number will fail to compile. Set this
323
+ * when a declared extension field is deleted.
324
+ *
325
+ * @generated from field: optional bool reserved = 5;
326
+ */
327
+ reserved?: boolean;
328
+ /**
329
+ * If true, indicates that the extension must be defined as repeated.
330
+ * Otherwise the extension must be defined as optional.
331
+ *
332
+ * @generated from field: optional bool repeated = 6;
333
+ */
334
+ repeated?: boolean;
335
+ constructor(data?: PartialMessage<ExtensionRangeOptions_Declaration>);
336
+ static readonly runtime: typeof proto2;
337
+ static readonly typeName = "google.protobuf.ExtensionRangeOptions.Declaration";
338
+ static readonly fields: FieldList;
339
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ExtensionRangeOptions_Declaration;
340
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ExtensionRangeOptions_Declaration;
341
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ExtensionRangeOptions_Declaration;
342
+ static equals(a: ExtensionRangeOptions_Declaration | PlainMessage<ExtensionRangeOptions_Declaration> | undefined, b: ExtensionRangeOptions_Declaration | PlainMessage<ExtensionRangeOptions_Declaration> | undefined): boolean;
343
+ }
254
344
  /**
255
345
  * Describes a field within a message.
256
346
  *
@@ -985,8 +1075,10 @@ export declare class FieldOptions extends Message<FieldOptions> {
985
1075
  /**
986
1076
  * The ctype option instructs the C++ code generator to use a different
987
1077
  * representation of the field than it normally would. See the specific
988
- * options below. This option is not yet implemented in the open source
989
- * release -- sorry, we'll try to include it in a future version!
1078
+ * options below. This option is only implemented to support use of
1079
+ * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
1080
+ * type "bytes" in the open source release -- sorry, we'll try to include
1081
+ * other types in a future version!
990
1082
  *
991
1083
  * @generated from field: optional google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
992
1084
  */
@@ -1087,9 +1179,14 @@ export declare class FieldOptions extends Message<FieldOptions> {
1087
1179
  */
1088
1180
  retention?: FieldOptions_OptionRetention;
1089
1181
  /**
1090
- * @generated from field: optional google.protobuf.FieldOptions.OptionTargetType target = 18;
1182
+ * @generated from field: optional google.protobuf.FieldOptions.OptionTargetType target = 18 [deprecated = true];
1183
+ * @deprecated
1091
1184
  */
1092
1185
  target?: FieldOptions_OptionTargetType;
1186
+ /**
1187
+ * @generated from field: repeated google.protobuf.FieldOptions.OptionTargetType targets = 19;
1188
+ */
1189
+ targets: FieldOptions_OptionTargetType[];
1093
1190
  /**
1094
1191
  * The parser stores options it doesn't recognize here. See above.
1095
1192
  *
@@ -1116,6 +1213,13 @@ export declare enum FieldOptions_CType {
1116
1213
  */
1117
1214
  STRING = 0,
1118
1215
  /**
1216
+ * The option [ctype=CORD] may be applied to a non-repeated field of type
1217
+ * "bytes". It indicates that in C++, the data should be stored in a Cord
1218
+ * instead of a string. For very large strings, this may reduce memory
1219
+ * fragmentation. It may also allow better performance when parsing from a
1220
+ * Cord, or when parsing with aliasing enabled, as the parsed Cord may then
1221
+ * alias the original buffer.
1222
+ *
1119
1223
  * @generated from enum value: CORD = 1;
1120
1224
  */
1121
1225
  CORD = 1,
@@ -8,7 +8,7 @@ import type { BinaryReadOptions } from "../../binary-format.js";
8
8
  * `NullValue` is a singleton enumeration to represent the null value for the
9
9
  * `Value` type union.
10
10
  *
11
- * The JSON representation for `NullValue` is JSON `null`.
11
+ * The JSON representation for `NullValue` is JSON `null`.
12
12
  *
13
13
  * @generated from enum google.protobuf.NullValue
14
14
  */
@@ -92,7 +92,7 @@ import type { BinaryReadOptions } from "../../binary-format.js";
92
92
  * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
93
93
  * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
94
94
  * the Joda Time's [`ISODateTimeFormat.dateTime()`](
95
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
95
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
96
96
  * ) to obtain a formatter capable of generating timestamps in this format.
97
97
  *
98
98
  *
@@ -23,7 +23,13 @@ export declare enum Syntax {
23
23
  *
24
24
  * @generated from enum value: SYNTAX_PROTO3 = 1;
25
25
  */
26
- PROTO3 = 1
26
+ PROTO3 = 1,
27
+ /**
28
+ * Syntax `editions`.
29
+ *
30
+ * @generated from enum value: SYNTAX_EDITIONS = 2;
31
+ */
32
+ EDITIONS = 2
27
33
  }
28
34
  /**
29
35
  * A protocol buffer message type.
@@ -67,6 +73,12 @@ export declare class Type extends Message<Type> {
67
73
  * @generated from field: google.protobuf.Syntax syntax = 6;
68
74
  */
69
75
  syntax: Syntax;
76
+ /**
77
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
78
+ *
79
+ * @generated from field: string edition = 7;
80
+ */
81
+ edition: string;
70
82
  constructor(data?: PartialMessage<Type>);
71
83
  static readonly runtime: typeof proto3;
72
84
  static readonly typeName = "google.protobuf.Type";
@@ -341,6 +353,12 @@ export declare class Enum extends Message<Enum> {
341
353
  * @generated from field: google.protobuf.Syntax syntax = 5;
342
354
  */
343
355
  syntax: Syntax;
356
+ /**
357
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
358
+ *
359
+ * @generated from field: string edition = 6;
360
+ */
361
+ edition: string;
344
362
  constructor(data?: PartialMessage<Enum>);
345
363
  static readonly runtime: typeof proto3;
346
364
  static readonly typeName = "google.protobuf.Enum";
@@ -4,7 +4,8 @@ export { protoInt64 } from "./proto-int64.js";
4
4
  export { protoBase64 } from "./proto-base64.js";
5
5
  export { protoDelimited } from "./proto-delimited.js";
6
6
  export { codegenInfo } from "./codegen-info.js";
7
- export { Message, AnyMessage, PartialMessage, PlainMessage, } from "./message.js";
7
+ export { Message } from "./message.js";
8
+ export type { AnyMessage, PartialMessage, PlainMessage } from "./message.js";
8
9
  export type { FieldInfo } from "./field.js";
9
10
  export type { FieldList } from "./field-list.js";
10
11
  export { ScalarType } from "./field.js";
@@ -15,10 +16,10 @@ export { MethodKind, MethodIdempotency } from "./service-type.js";
15
16
  export { WireType, BinaryWriter, BinaryReader } from "./binary-encoding.js";
16
17
  export type { IBinaryReader, IBinaryWriter } from "./binary-encoding.js";
17
18
  export type { BinaryFormat, BinaryWriteOptions, BinaryReadOptions, } from "./binary-format.js";
18
- export { JsonFormat, JsonObject, JsonValue, JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, } from "./json-format.js";
19
- export { DescriptorSet, AnyDesc, DescFile, DescEnum, DescEnumValue, DescMessage, DescOneof, DescField, DescService, DescMethod, DescExtension, DescComments, } from "./descriptor-set.js";
19
+ export type { JsonFormat, JsonObject, JsonValue, JsonReadOptions, JsonWriteOptions, JsonWriteStringOptions, } from "./json-format.js";
20
+ export type { DescriptorSet, AnyDesc, DescFile, DescEnum, DescEnumValue, DescMessage, DescOneof, DescField, DescService, DescMethod, DescExtension, DescComments, } from "./descriptor-set.js";
20
21
  export { createDescriptorSet } from "./create-descriptor-set.js";
21
- export { IMessageTypeRegistry } from "./type-registry.js";
22
+ export type { IMessageTypeRegistry } from "./type-registry.js";
22
23
  export { createRegistry } from "./create-registry.js";
23
24
  export { createRegistryFromDescriptors } from "./create-registry-from-desc.js";
24
25
  export * from "./google/protobuf/compiler/plugin_pb.js";
@@ -1,7 +1,8 @@
1
- import { IBinaryWriter } from "../binary-encoding.js";
1
+ import type { IBinaryWriter } from "../binary-encoding.js";
2
2
  import type { BinaryWriteOptions } from "../binary-format.js";
3
3
  import type { BinaryFormat } from "../binary-format.js";
4
- import { FieldInfo, ScalarType } from "../field.js";
4
+ import { ScalarType } from "../field.js";
5
+ import type { FieldInfo } from "../field.js";
5
6
  import type { MessageType } from "../message-type.js";
6
7
  export declare function makeBinaryFormatCommon(): Omit<BinaryFormat, "writeMessage">;
7
8
  export declare function writeMapEntry(writer: IBinaryWriter, options: BinaryWriteOptions, field: FieldInfo & {
@@ -1,5 +1,6 @@
1
1
  import type { JsonFormat, JsonValue, JsonWriteOptions } from "../json-format.js";
2
- import { FieldInfo, ScalarType } from "../field.js";
2
+ import { ScalarType } from "../field.js";
3
+ import type { FieldInfo } from "../field.js";
3
4
  import type { EnumType } from "../enum.js";
4
5
  type JsonFormatWriteFieldFn = (field: FieldInfo, value: any, options: JsonWriteOptions) => JsonValue | undefined;
5
6
  export declare function makeJsonFormatCommon(makeWriteField: (writeEnumFn: typeof writeEnum, writeScalarFn: typeof writeScalar) => JsonFormatWriteFieldFn): JsonFormat;
@@ -1,4 +1,5 @@
1
- import { AnyMessage, Message } from "../message.js";
1
+ import { Message } from "../message.js";
2
+ import type { AnyMessage } from "../message.js";
2
3
  import type { FieldListSource } from "./field-list.js";
3
4
  import type { MessageType } from "../message-type.js";
4
5
  import type { ProtoRuntime } from "./proto-runtime.js";
@@ -31,4 +31,13 @@ export declare function findEnumSharedPrefix(enumName: string, valueNames: strin
31
31
  * used by protoc to convert a field name to a JSON name.
32
32
  */
33
33
  declare function protoCamelCase(snakeCase: string): string;
34
+ /**
35
+ * Names that cannot be used for object properties because they are reserved
36
+ * by built-in JavaScript properties.
37
+ */
38
+ export declare const safeObjectProperty: (name: string) => string;
39
+ /**
40
+ * Names that can be used for identifiers or class properties
41
+ */
42
+ export declare const safeIdentifier: (name: string) => string;
34
43
  export {};
@@ -1,5 +1,6 @@
1
1
  import { ScalarType } from "../field.js";
2
- import { IBinaryWriter, WireType } from "../binary-encoding.js";
2
+ import type { IBinaryWriter } from "../binary-encoding.js";
3
+ import { WireType } from "../binary-encoding.js";
3
4
  /**
4
5
  * Returns true if both scalar values are equal.
5
6
  */
@@ -12,15 +12,7 @@ export declare const protoBase64: {
12
12
  */
13
13
  readonly dec: (base64Str: string) => Uint8Array;
14
14
  /**
15
- * Decodes a base64 string to a byte array.
16
- *
17
- * - ignores white-space, including line breaks and tabs
18
- * - allows inner padding (can decode concatenated base64 strings)
19
- * - does not require padding
20
- * - understands base64url encoding:
21
- * "-" instead of "+",
22
- * "_" instead of "/",
23
- * no padding
15
+ * Encode a byte array to a base64 string.
24
16
  */
25
17
  readonly enc: (bytes: Uint8Array) => string;
26
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protobuf",
3
- "version": "1.1.1",
3
+ "version": "1.2.1",
4
4
  "license": "(Apache-2.0 AND BSD-3-Clause)",
5
5
  "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.",
6
6
  "repository": {
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf ./dist/cjs/* ./dist/esm/* ./dist/types/*",
14
14
  "build": "npm run build:cjs && npm run build:esm+types",
15
15
  "build:cjs": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
16
- "build:esm+types": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --outDir ./dist/esm --declaration --declarationDir ./dist/types"
16
+ "build:esm+types": "../../node_modules/typescript/bin/tsc --project tsconfig.json --module ES2015 --verbatimModuleSyntax --outDir ./dist/esm --declaration --declarationDir ./dist/types"
17
17
  },
18
18
  "main": "./dist/cjs/index.js",
19
19
  "type": "module",