@fluid-internal/client-utils 2.0.0-dev-rc.3.0.0.250606 → 2.0.0-dev-rc.3.0.0.253463
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.
- package/dist/hashFileBrowser.d.ts.map +1 -1
- package/dist/hashFileBrowser.js.map +1 -1
- package/dist/typedEventEmitter.d.ts.map +1 -1
- package/dist/typedEventEmitter.js.map +1 -1
- package/lib/hashFileBrowser.d.ts.map +1 -1
- package/lib/hashFileBrowser.js.map +1 -1
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/typedEventEmitter.d.ts.map +1 -1
- package/lib/typedEventEmitter.js.map +1 -1
- package/package.json +6 -8
- package/src/hashFileBrowser.ts +1 -0
- package/src/typedEventEmitter.ts +1 -0
- package/lib/test/mocha/typedEventEmitter.spec.js +0 -43
- package/lib/test/mocha/typedEventEmitter.spec.js.map +0 -1
- package/lib/test/types/validateClientUtilsPrevious.generated.js +0 -42
- package/lib/test/types/validateClientUtilsPrevious.generated.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyB/C;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAC7B,IAAI,EAAE,SAAS,EACf,SAAS,GAAE,OAAO,GAAG,SAAmB,EACxC,YAAY,GAAE,KAAK,GAAG,QAAgB,GACpC,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAEtC,yDAA+C;AAE/C,KAAK,UAAU,YAAY,CAAC,IAAe,EAAE,SAA8B;IAC1E,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CAAC,SAAqB,EAAE,QAA0B;IACtE,wCAAwC;IACxC,QAAQ,QAAQ,EAAE;QACjB,KAAK,KAAK,CAAC,CAAC;YACX,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG;iBACjC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,yGAAyG;gBACzG,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAW,CAAC;YACrD,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAC;YACX,OAAO,OAAO,CAAC;SACf;QACD,KAAK,QAAQ,CAAC,CAAC;YACd,OAAO,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;SACzC;KACD;AACF,CAAC;AAED;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,QAAQ,CAC7B,IAAe,EACf,YAAiC,OAAO,EACxC,eAAiC,KAAK;IAEtC,8DAA8D;IAC9D,2DAA2D;IAC3D,gFAAgF;IAChF,8EAA8E;IAC9E,8BAA8B;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;QAChC,OAAO,MAAM;QACZ,qDAAqD;QACrD,mBAAmB,CACnB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;KAC/D;IAED,+EAA+E;IAC/E,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,OAAO,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC;AApBD,4BAoBC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,WAAW,CAAC,IAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7B,qDAAqD;IACrD,MAAM,UAAU,GAAG,QAAQ,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,MAAM,UAAU,GAAG,4BAAS,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhE,mEAAmE;IACnE,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC;AARD,kCAQC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as base64js from \"base64-js\";\n\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n\nasync function digestBuffer(file: IsoBuffer, algorithm: \"SHA-1\" | \"SHA-256\"): Promise<Uint8Array> {\n\tconst hash = await crypto.subtle.digest(algorithm, file);\n\treturn new Uint8Array(hash);\n}\n\nfunction encodeDigest(hashArray: Uint8Array, encoding: \"hex\" | \"base64\"): string {\n\t// eslint-disable-next-line default-case\n\tswitch (encoding) {\n\t\tcase \"hex\": {\n\t\t\tconst hashHex = Array.prototype.map\n\t\t\t\t.call(hashArray, (byte) => {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t\treturn byte.toString(16).padStart(2, \"0\") as string;\n\t\t\t\t})\n\t\t\t\t.join(\"\");\n\t\t\treturn hashHex;\n\t\t}\n\t\tcase \"base64\": {\n\t\t\treturn base64js.fromByteArray(hashArray);\n\t\t}\n\t}\n}\n\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(\n\tfile: IsoBuffer,\n\talgorithm: \"SHA-1\" | \"SHA-256\" = \"SHA-1\",\n\thashEncoding: \"hex\" | \"base64\" = \"hex\",\n): Promise<string> {\n\t// Handle insecure contexts (e.g. running with local services)\n\t// by deferring to Node version, which uses a hash polyfill\n\t// When packed, this chunk will show as \"FluidFramework-HashFallback\" separately\n\t// from the main chunk and will be of non-trivial size. It will not be served\n\t// under normal circumstances.\n\tif (crypto.subtle === undefined) {\n\t\treturn import(\n\t\t\t/* webpackChunkName: \"FluidFramework-HashFallback\" */\n\t\t\t\"./hashFileNode.js\"\n\t\t).then(async (m) => m.hashFile(file, algorithm, hashEncoding));\n\t}\n\n\t// This is split up this way to facilitate testing (see the test for more info)\n\tconst hashArray = await digestBuffer(file, algorithm);\n\treturn encodeDigest(hashArray, hashEncoding);\n}\n\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file: IsoBuffer): Promise<string> {\n\tconst size = file.byteLength;\n\t// eslint-disable-next-line unicorn/prefer-code-point\n\tconst filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n\tconst hashBuffer = IsoBuffer.from(filePrefix + file.toString());\n\n\t// hashFile uses sha1; if that changes this will need to change too\n\treturn hashFile(hashBuffer);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.d.ts","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"typedEventEmitter.d.ts","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,EAAE,MAAM,IAK5C,gBAAgB,CACf,KAAK,EACL,aAAa,GAAG,gBAAgB,EAEhC,UAAU,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC,CACvE,GAEA,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAGzC,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;AAExD;;;GAGG;AACH,qBAAa,iBAAiB,CAAC,MAAM,CACpC,SAAQ,YACR,YAAW,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;;IAkB1C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5D,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChE,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC3D,QAAQ,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,yDAAkD;AA+BlD;;;GAGG;AACH,MAAa,iBACZ,SAAQ,+BAAY;IAGpB;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACrF,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACnE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAGrD,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAG7D,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QAC3F,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;IACtE,CAAC;CAQD;AA3BD,8CA2BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tIEventTransformer,\n\tTransformedEvent,\n} from \"@fluidframework/core-interfaces\";\n\nimport { EventEmitter } from \"./eventEmitter.cjs\";\n\n/**\n * The event emitter polyfill and the node event emitter have different event types:\n * string | symbol vs. string | number\n *\n * The polyfill is now always used, but string is the only event type preferred.\n * @public\n */\nexport type EventEmitterEventType = string;\n\n/**\n * @public\n */\nexport type TypedEventTransform<TThis, TEvent> =\n\t// Event emitter supports some special events for the emitter itself to use\n\t// this exposes those events for the TypedEventEmitter.\n\t// Since we know what the shape of these events are, we can describe them directly via a TransformedEvent\n\t// which easier than trying to extend TEvent directly\n\tTransformedEvent<\n\t\tTThis,\n\t\t\"newListener\" | \"removeListener\",\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tParameters<(event: string, listener: (...args: any[]) => void) => void>\n\t> &\n\t\t// Expose all the events provides by TEvent\n\t\tIEventTransformer<TThis, TEvent & IEvent> &\n\t\t// Add the default overload so this is covertable to EventEmitter regardless of environment\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tTransformedEvent<TThis, EventEmitterEventType, any[]>;\n\n/**\n * Event Emitter helper class the supports emitting typed events\n * @public\n */\nexport class TypedEventEmitter<TEvent>\n\textends EventEmitter\n\timplements IEventProvider<TEvent & IEvent>\n{\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addListener = super.addListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.on = super.on.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.once = super.once.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.prependListener = super.prependListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.prependOnceListener = super.prependOnceListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.removeListener = super.removeListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.off = super.off.bind(this) as TypedEventTransform<this, TEvent>;\n\t}\n\treadonly addListener: TypedEventTransform<this, TEvent>;\n\treadonly on: TypedEventTransform<this, TEvent>;\n\treadonly once: TypedEventTransform<this, TEvent>;\n\treadonly prependListener: TypedEventTransform<this, TEvent>;\n\treadonly prependOnceListener: TypedEventTransform<this, TEvent>;\n\treadonly removeListener: TypedEventTransform<this, TEvent>;\n\treadonly off: TypedEventTransform<this, TEvent>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyB/C;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAC7B,IAAI,EAAE,SAAS,EACf,SAAS,GAAE,OAAO,GAAG,SAAmB,EACxC,YAAY,GAAE,KAAK,GAAG,QAAgB,GACpC,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,KAAK,UAAU,YAAY,CAAC,IAAe,EAAE,SAA8B;IAC1E,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CAAC,SAAqB,EAAE,QAA0B;IACtE,wCAAwC;IACxC,QAAQ,QAAQ,EAAE;QACjB,KAAK,KAAK,CAAC,CAAC;YACX,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG;iBACjC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,yGAAyG;gBACzG,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAW,CAAC;YACrD,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAC;YACX,OAAO,OAAO,CAAC;SACf;QACD,KAAK,QAAQ,CAAC,CAAC;YACd,OAAO,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;SACzC;KACD;AACF,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC7B,IAAe,EACf,YAAiC,OAAO,EACxC,eAAiC,KAAK;IAEtC,8DAA8D;IAC9D,2DAA2D;IAC3D,gFAAgF;IAChF,8EAA8E;IAC9E,8BAA8B;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;QAChC,OAAO,MAAM;QACZ,qDAAqD;QACrD,mBAAmB,CACnB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;KAC/D;IAED,+EAA+E;IAC/E,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,OAAO,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7B,qDAAqD;IACrD,MAAM,UAAU,GAAG,QAAQ,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhE,mEAAmE;IACnE,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as base64js from \"base64-js\";\n\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n\nasync function digestBuffer(file: IsoBuffer, algorithm: \"SHA-1\" | \"SHA-256\"): Promise<Uint8Array> {\n\tconst hash = await crypto.subtle.digest(algorithm, file);\n\treturn new Uint8Array(hash);\n}\n\nfunction encodeDigest(hashArray: Uint8Array, encoding: \"hex\" | \"base64\"): string {\n\t// eslint-disable-next-line default-case\n\tswitch (encoding) {\n\t\tcase \"hex\": {\n\t\t\tconst hashHex = Array.prototype.map\n\t\t\t\t.call(hashArray, (byte) => {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t\treturn byte.toString(16).padStart(2, \"0\") as string;\n\t\t\t\t})\n\t\t\t\t.join(\"\");\n\t\t\treturn hashHex;\n\t\t}\n\t\tcase \"base64\": {\n\t\t\treturn base64js.fromByteArray(hashArray);\n\t\t}\n\t}\n}\n\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(\n\tfile: IsoBuffer,\n\talgorithm: \"SHA-1\" | \"SHA-256\" = \"SHA-1\",\n\thashEncoding: \"hex\" | \"base64\" = \"hex\",\n): Promise<string> {\n\t// Handle insecure contexts (e.g. running with local services)\n\t// by deferring to Node version, which uses a hash polyfill\n\t// When packed, this chunk will show as \"FluidFramework-HashFallback\" separately\n\t// from the main chunk and will be of non-trivial size. It will not be served\n\t// under normal circumstances.\n\tif (crypto.subtle === undefined) {\n\t\treturn import(\n\t\t\t/* webpackChunkName: \"FluidFramework-HashFallback\" */\n\t\t\t\"./hashFileNode.js\"\n\t\t).then(async (m) => m.hashFile(file, algorithm, hashEncoding));\n\t}\n\n\t// This is split up this way to facilitate testing (see the test for more info)\n\tconst hashArray = await digestBuffer(file, algorithm);\n\treturn encodeDigest(hashArray, hashEncoding);\n}\n\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file: IsoBuffer): Promise<string> {\n\tconst size = file.byteLength;\n\t// eslint-disable-next-line unicorn/prefer-code-point\n\tconst filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n\tconst hashBuffer = IsoBuffer.from(filePrefix + file.toString());\n\n\t// hashFile uses sha1; if that changes this will need to change too\n\treturn hashFile(hashBuffer);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.42.3"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.d.ts","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"typedEventEmitter.d.ts","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,KAAK,EAAE,MAAM,IAK5C,gBAAgB,CACf,KAAK,EACL,aAAa,GAAG,gBAAgB,EAEhC,UAAU,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC,CACvE,GAEA,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAGzC,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC,CAAC;AAExD;;;GAGG;AACH,qBAAa,iBAAiB,CAAC,MAAM,CACpC,SAAQ,YACR,YAAW,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;;IAkB1C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACjD,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5D,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAChE,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC3D,QAAQ,CAAC,GAAG,EAAE,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+BlD;;;GAGG;AACH,MAAM,OAAO,iBACZ,SAAQ,YAAY;IAGpB;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACrF,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACnE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAGrD,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAG7D,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QAC3F,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;IACtE,CAAC;CAQD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tIEventTransformer,\n\tTransformedEvent,\n} from \"@fluidframework/core-interfaces\";\n\nimport { EventEmitter } from \"./eventEmitter.cjs\";\n\n/**\n * The event emitter polyfill and the node event emitter have different event types:\n * string | symbol vs. string | number\n *\n * The polyfill is now always used, but string is the only event type preferred.\n * @public\n */\nexport type EventEmitterEventType = string;\n\n/**\n * @public\n */\nexport type TypedEventTransform<TThis, TEvent> =\n\t// Event emitter supports some special events for the emitter itself to use\n\t// this exposes those events for the TypedEventEmitter.\n\t// Since we know what the shape of these events are, we can describe them directly via a TransformedEvent\n\t// which easier than trying to extend TEvent directly\n\tTransformedEvent<\n\t\tTThis,\n\t\t\"newListener\" | \"removeListener\",\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tParameters<(event: string, listener: (...args: any[]) => void) => void>\n\t> &\n\t\t// Expose all the events provides by TEvent\n\t\tIEventTransformer<TThis, TEvent & IEvent> &\n\t\t// Add the default overload so this is covertable to EventEmitter regardless of environment\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tTransformedEvent<TThis, EventEmitterEventType, any[]>;\n\n/**\n * Event Emitter helper class the supports emitting typed events\n * @public\n */\nexport class TypedEventEmitter<TEvent>\n\textends EventEmitter\n\timplements IEventProvider<TEvent & IEvent>\n{\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addListener = super.addListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.on = super.on.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.once = super.once.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.prependListener = super.prependListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.prependOnceListener = super.prependOnceListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.removeListener = super.removeListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.off = super.off.bind(this) as TypedEventTransform<this, TEvent>;\n\t}\n\treadonly addListener: TypedEventTransform<this, TEvent>;\n\treadonly on: TypedEventTransform<this, TEvent>;\n\treadonly once: TypedEventTransform<this, TEvent>;\n\treadonly prependListener: TypedEventTransform<this, TEvent>;\n\treadonly prependOnceListener: TypedEventTransform<this, TEvent>;\n\treadonly removeListener: TypedEventTransform<this, TEvent>;\n\treadonly off: TypedEventTransform<this, TEvent>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-internal/client-utils",
|
|
3
|
-
"version": "2.0.0-dev-rc.3.0.0.
|
|
3
|
+
"version": "2.0.0-dev-rc.3.0.0.253463",
|
|
4
4
|
"description": "Not intended for use outside the Fluid Framework.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"temp-directory": "nyc/.nyc_output"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.
|
|
57
|
-
"@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.
|
|
56
|
+
"@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.253463",
|
|
57
|
+
"@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.253463",
|
|
58
58
|
"@types/events_pkg": "npm:@types/events@^3.0.0",
|
|
59
59
|
"base64-js": "^1.5.1",
|
|
60
60
|
"buffer": "^6.0.3",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"sha.js": "^2.4.11"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@arethetypeswrong/cli": "^0.
|
|
66
|
+
"@arethetypeswrong/cli": "^0.15.2",
|
|
67
67
|
"@biomejs/biome": "^1.6.2",
|
|
68
68
|
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.0.0-internal.8.0.0",
|
|
69
|
-
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.
|
|
69
|
+
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.253463",
|
|
70
70
|
"@fluid-tools/build-cli": "^0.34.0",
|
|
71
71
|
"@fluidframework/build-common": "^2.0.3",
|
|
72
72
|
"@fluidframework/build-tools": "^0.34.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@microsoft/api-extractor": "^7.42.3",
|
|
75
75
|
"@types/base64-js": "^1.3.0",
|
|
76
76
|
"@types/jest": "29.5.3",
|
|
77
|
-
"@types/jest-environment-puppeteer": "2.0.0-dev-rc.3.0.0.
|
|
77
|
+
"@types/jest-environment-puppeteer": "2.0.0-dev-rc.3.0.0.253463",
|
|
78
78
|
"@types/mocha": "^9.1.1",
|
|
79
79
|
"@types/node": "^18.19.0",
|
|
80
80
|
"@types/rewire": "^2.5.28",
|
|
@@ -161,7 +161,6 @@
|
|
|
161
161
|
"build:test:mocha:esm": "tsc --project ./src/test/mocha/tsconfig.json",
|
|
162
162
|
"build:test:types": "tsc --project ./src/test/types/tsconfig.json",
|
|
163
163
|
"check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
|
164
|
-
"check:biome": "biome check .",
|
|
165
164
|
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
166
165
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
167
166
|
"ci:build:docs": "api-extractor run",
|
|
@@ -169,7 +168,6 @@
|
|
|
169
168
|
"eslint": "eslint --format stylish src",
|
|
170
169
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
171
170
|
"format": "fluid-build --task format .",
|
|
172
|
-
"format:biome": "biome check --apply .",
|
|
173
171
|
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
174
172
|
"lint": "fluid-build . --task lint",
|
|
175
173
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
package/src/hashFileBrowser.ts
CHANGED
package/src/typedEventEmitter.ts
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import { strict as assert } from "node:assert";
|
|
6
|
-
import { TypedEventEmitter } from "../../typedEventEmitter.js";
|
|
7
|
-
describe("TypedEventEmitter", () => {
|
|
8
|
-
it("Validate Function proxies", () => {
|
|
9
|
-
const tee = new TypedEventEmitter();
|
|
10
|
-
let once = 0;
|
|
11
|
-
tee.once("error", () => once++);
|
|
12
|
-
assert.equal(tee.listenerCount("error"), 1);
|
|
13
|
-
let on = 0;
|
|
14
|
-
tee.on("error", () => on++);
|
|
15
|
-
assert.equal(tee.listenerCount("error"), 2);
|
|
16
|
-
for (let i = 0; i < 5; i++) {
|
|
17
|
-
tee.emit("error", "message");
|
|
18
|
-
}
|
|
19
|
-
assert.equal(once, 1);
|
|
20
|
-
assert.equal(on, 5);
|
|
21
|
-
});
|
|
22
|
-
it("Validate new and remove Listener", () => {
|
|
23
|
-
const tee = new TypedEventEmitter();
|
|
24
|
-
let newListenerCalls = 0;
|
|
25
|
-
let removeListenerCalls = 0;
|
|
26
|
-
const errListener = () => { };
|
|
27
|
-
tee.on("removeListener", (event, listener) => {
|
|
28
|
-
assert.equal(event, "error");
|
|
29
|
-
assert.equal(listener, errListener);
|
|
30
|
-
removeListenerCalls++;
|
|
31
|
-
});
|
|
32
|
-
tee.on("newListener", (event, listener) => {
|
|
33
|
-
assert.equal(event, "error");
|
|
34
|
-
assert.equal(listener, errListener);
|
|
35
|
-
newListenerCalls++;
|
|
36
|
-
});
|
|
37
|
-
tee.on("error", errListener);
|
|
38
|
-
tee.removeListener("error", errListener);
|
|
39
|
-
assert.equal(newListenerCalls, 1);
|
|
40
|
-
assert.equal(removeListenerCalls, 1);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=typedEventEmitter.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.spec.js","sourceRoot":"","sources":["../../../src/test/mocha/typedEventEmitter.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACpC,MAAM,GAAG,GAAG,IAAI,iBAAiB,EAAe,CAAC;QACjD,IAAI,IAAI,GAAG,CAAC,CAAC;QAEb,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAChC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5C,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YAC3B,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;SAC7B;QAED,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACtB,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC3C,MAAM,GAAG,GAAG,IAAI,iBAAiB,EAAe,CAAC;QACjD,IAAI,gBAAgB,GAAG,CAAC,CAAC;QACzB,IAAI,mBAAmB,GAAG,CAAC,CAAC;QAC5B,MAAM,WAAW,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;QACnC,GAAG,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YAC5C,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC7B,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;YACpC,mBAAmB,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;YACzC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC7B,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;YACpC,gBAAgB,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC7B,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAEzC,MAAM,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\nimport { IErrorEvent } from \"@fluidframework/core-interfaces\";\nimport { TypedEventEmitter } from \"../../typedEventEmitter.js\";\n\ndescribe(\"TypedEventEmitter\", () => {\n\tit(\"Validate Function proxies\", () => {\n\t\tconst tee = new TypedEventEmitter<IErrorEvent>();\n\t\tlet once = 0;\n\n\t\ttee.once(\"error\", () => once++);\n\t\tassert.equal(tee.listenerCount(\"error\"), 1);\n\n\t\tlet on = 0;\n\t\ttee.on(\"error\", () => on++);\n\t\tassert.equal(tee.listenerCount(\"error\"), 2);\n\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\ttee.emit(\"error\", \"message\");\n\t\t}\n\n\t\tassert.equal(once, 1);\n\t\tassert.equal(on, 5);\n\t});\n\n\tit(\"Validate new and remove Listener\", () => {\n\t\tconst tee = new TypedEventEmitter<IErrorEvent>();\n\t\tlet newListenerCalls = 0;\n\t\tlet removeListenerCalls = 0;\n\t\tconst errListener = (): void => {};\n\t\ttee.on(\"removeListener\", (event, listener) => {\n\t\t\tassert.equal(event, \"error\");\n\t\t\tassert.equal(listener, errListener);\n\t\t\tremoveListenerCalls++;\n\t\t});\n\t\ttee.on(\"newListener\", (event, listener) => {\n\t\t\tassert.equal(event, \"error\");\n\t\t\tassert.equal(listener, errListener);\n\t\t\tnewListenerCalls++;\n\t\t});\n\n\t\ttee.on(\"error\", errListener);\n\t\ttee.removeListener(\"error\", errListener);\n\n\t\tassert.equal(newListenerCalls, 1);\n\t\tassert.equal(removeListenerCalls, 1);\n\t});\n});\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
use_current_ClassDeclaration_Buffer(get_old_ClassDeclaration_Buffer());
|
|
2
|
-
use_old_ClassDeclaration_Buffer(get_current_ClassDeclaration_Buffer());
|
|
3
|
-
use_current_TypeAliasDeclaration_EventEmitterEventType(
|
|
4
|
-
// @ts-expect-error compatibility expected to be broken
|
|
5
|
-
get_old_TypeAliasDeclaration_EventEmitterEventType());
|
|
6
|
-
use_old_TypeAliasDeclaration_EventEmitterEventType(get_current_TypeAliasDeclaration_EventEmitterEventType());
|
|
7
|
-
use_current_InterfaceDeclaration_ITraceEvent(get_old_InterfaceDeclaration_ITraceEvent());
|
|
8
|
-
use_old_InterfaceDeclaration_ITraceEvent(get_current_InterfaceDeclaration_ITraceEvent());
|
|
9
|
-
use_current_VariableDeclaration_IsoBuffer(get_old_VariableDeclaration_IsoBuffer());
|
|
10
|
-
use_old_VariableDeclaration_IsoBuffer(get_current_VariableDeclaration_IsoBuffer());
|
|
11
|
-
use_current_TypeAliasDeclaration_IsoBuffer(get_old_TypeAliasDeclaration_IsoBuffer());
|
|
12
|
-
use_old_TypeAliasDeclaration_IsoBuffer(get_current_TypeAliasDeclaration_IsoBuffer());
|
|
13
|
-
use_current_TypeAliasDeclaration_IsomorphicPerformance(get_old_TypeAliasDeclaration_IsomorphicPerformance());
|
|
14
|
-
use_old_TypeAliasDeclaration_IsomorphicPerformance(get_current_TypeAliasDeclaration_IsomorphicPerformance());
|
|
15
|
-
use_current_ClassDeclaration_Trace(get_old_ClassDeclaration_Trace());
|
|
16
|
-
use_old_ClassDeclaration_Trace(get_current_ClassDeclaration_Trace());
|
|
17
|
-
use_current_ClassDeclaration_TypedEventEmitter(get_old_ClassDeclaration_TypedEventEmitter());
|
|
18
|
-
use_old_ClassDeclaration_TypedEventEmitter(get_current_ClassDeclaration_TypedEventEmitter());
|
|
19
|
-
use_current_TypeAliasDeclaration_TypedEventTransform(get_old_TypeAliasDeclaration_TypedEventTransform());
|
|
20
|
-
use_old_TypeAliasDeclaration_TypedEventTransform(get_current_TypeAliasDeclaration_TypedEventTransform());
|
|
21
|
-
use_current_FunctionDeclaration_Uint8ArrayToArrayBuffer(get_old_FunctionDeclaration_Uint8ArrayToArrayBuffer());
|
|
22
|
-
use_old_FunctionDeclaration_Uint8ArrayToArrayBuffer(get_current_FunctionDeclaration_Uint8ArrayToArrayBuffer());
|
|
23
|
-
use_current_FunctionDeclaration_Uint8ArrayToString(get_old_FunctionDeclaration_Uint8ArrayToString());
|
|
24
|
-
use_old_FunctionDeclaration_Uint8ArrayToString(get_current_FunctionDeclaration_Uint8ArrayToString());
|
|
25
|
-
use_current_VariableDeclaration_bufferToString(get_old_VariableDeclaration_bufferToString());
|
|
26
|
-
use_old_VariableDeclaration_bufferToString(get_current_VariableDeclaration_bufferToString());
|
|
27
|
-
use_current_VariableDeclaration_fromBase64ToUtf8(get_old_VariableDeclaration_fromBase64ToUtf8());
|
|
28
|
-
use_old_VariableDeclaration_fromBase64ToUtf8(get_current_VariableDeclaration_fromBase64ToUtf8());
|
|
29
|
-
use_current_VariableDeclaration_fromUtf8ToBase64(get_old_VariableDeclaration_fromUtf8ToBase64());
|
|
30
|
-
use_old_VariableDeclaration_fromUtf8ToBase64(get_current_VariableDeclaration_fromUtf8ToBase64());
|
|
31
|
-
use_current_FunctionDeclaration_gitHashFile(get_old_FunctionDeclaration_gitHashFile());
|
|
32
|
-
use_old_FunctionDeclaration_gitHashFile(get_current_FunctionDeclaration_gitHashFile());
|
|
33
|
-
use_current_FunctionDeclaration_hashFile(get_old_FunctionDeclaration_hashFile());
|
|
34
|
-
use_old_FunctionDeclaration_hashFile(get_current_FunctionDeclaration_hashFile());
|
|
35
|
-
use_current_VariableDeclaration_performance(get_old_VariableDeclaration_performance());
|
|
36
|
-
use_old_VariableDeclaration_performance(get_current_VariableDeclaration_performance());
|
|
37
|
-
use_current_FunctionDeclaration_stringToBuffer(get_old_FunctionDeclaration_stringToBuffer());
|
|
38
|
-
use_old_FunctionDeclaration_stringToBuffer(get_current_FunctionDeclaration_stringToBuffer());
|
|
39
|
-
use_current_VariableDeclaration_toUtf8(get_old_VariableDeclaration_toUtf8());
|
|
40
|
-
use_old_VariableDeclaration_toUtf8(get_current_VariableDeclaration_toUtf8());
|
|
41
|
-
export {};
|
|
42
|
-
//# sourceMappingURL=validateClientUtilsPrevious.generated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateClientUtilsPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateClientUtilsPrevious.generated.ts"],"names":[],"mappings":"AAgCA,mCAAmC,CAC/B,+BAA+B,EAAE,CAAC,CAAC;AAWvC,+BAA+B,CAC3B,mCAAmC,EAAE,CAAC,CAAC;AAW3C,sDAAsD;AAClD,uDAAuD;AACvD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAuB9D,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,yCAAyC,CACrC,qCAAqC,EAAE,CAAC,CAAC;AAW7C,qCAAqC,CACjC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,0CAA0C,CACtC,sCAAsC,EAAE,CAAC,CAAC;AAW9C,sCAAsC,CAClC,0CAA0C,EAAE,CAAC,CAAC;AAWlD,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAW9D,kCAAkC,CAC9B,8BAA8B,EAAE,CAAC,CAAC;AAWtC,8BAA8B,CAC1B,kCAAkC,EAAE,CAAC,CAAC;AAW1C,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,kDAAkD,CAC9C,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,wCAAwC,CACpC,oCAAoC,EAAE,CAAC,CAAC;AAW5C,oCAAoC,CAChC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,2CAA2C,CACvC,uCAAuC,EAAE,CAAC,CAAC;AAW/C,uCAAuC,CACnC,2CAA2C,EAAE,CAAC,CAAC;AAWnD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,sCAAsC,CAClC,kCAAkC,EAAE,CAAC,CAAC;AAW1C,kCAAkC,CAC9B,sCAAsC,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluid-internal/client-utils-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_Buffer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_Buffer():\n TypeOnly<old.Buffer>;\ndeclare function use_current_ClassDeclaration_Buffer(\n use: TypeOnly<current.Buffer>): void;\nuse_current_ClassDeclaration_Buffer(\n get_old_ClassDeclaration_Buffer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_Buffer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_Buffer():\n TypeOnly<current.Buffer>;\ndeclare function use_old_ClassDeclaration_Buffer(\n use: TypeOnly<old.Buffer>): void;\nuse_old_ClassDeclaration_Buffer(\n get_current_ClassDeclaration_Buffer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_EventEmitterEventType\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_EventEmitterEventType():\n TypeOnly<old.EventEmitterEventType>;\ndeclare function use_current_TypeAliasDeclaration_EventEmitterEventType(\n use: TypeOnly<current.EventEmitterEventType>): void;\nuse_current_TypeAliasDeclaration_EventEmitterEventType(\n // @ts-expect-error compatibility expected to be broken\n get_old_TypeAliasDeclaration_EventEmitterEventType());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_EventEmitterEventType\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_EventEmitterEventType():\n TypeOnly<current.EventEmitterEventType>;\ndeclare function use_old_TypeAliasDeclaration_EventEmitterEventType(\n use: TypeOnly<old.EventEmitterEventType>): void;\nuse_old_TypeAliasDeclaration_EventEmitterEventType(\n get_current_TypeAliasDeclaration_EventEmitterEventType());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedClassDeclaration_EventForwarder\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedClassDeclaration_EventForwarder\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ITraceEvent\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ITraceEvent():\n TypeOnly<old.ITraceEvent>;\ndeclare function use_current_InterfaceDeclaration_ITraceEvent(\n use: TypeOnly<current.ITraceEvent>): void;\nuse_current_InterfaceDeclaration_ITraceEvent(\n get_old_InterfaceDeclaration_ITraceEvent());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ITraceEvent\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ITraceEvent():\n TypeOnly<current.ITraceEvent>;\ndeclare function use_old_InterfaceDeclaration_ITraceEvent(\n use: TypeOnly<old.ITraceEvent>): void;\nuse_old_InterfaceDeclaration_ITraceEvent(\n get_current_InterfaceDeclaration_ITraceEvent());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_IsoBuffer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_IsoBuffer():\n TypeOnly<typeof old.IsoBuffer>;\ndeclare function use_current_VariableDeclaration_IsoBuffer(\n use: TypeOnly<typeof current.IsoBuffer>): void;\nuse_current_VariableDeclaration_IsoBuffer(\n get_old_VariableDeclaration_IsoBuffer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_IsoBuffer\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_IsoBuffer():\n TypeOnly<typeof current.IsoBuffer>;\ndeclare function use_old_VariableDeclaration_IsoBuffer(\n use: TypeOnly<typeof old.IsoBuffer>): void;\nuse_old_VariableDeclaration_IsoBuffer(\n get_current_VariableDeclaration_IsoBuffer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_IsoBuffer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_IsoBuffer():\n TypeOnly<old.IsoBuffer>;\ndeclare function use_current_TypeAliasDeclaration_IsoBuffer(\n use: TypeOnly<current.IsoBuffer>): void;\nuse_current_TypeAliasDeclaration_IsoBuffer(\n get_old_TypeAliasDeclaration_IsoBuffer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_IsoBuffer\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_IsoBuffer():\n TypeOnly<current.IsoBuffer>;\ndeclare function use_old_TypeAliasDeclaration_IsoBuffer(\n use: TypeOnly<old.IsoBuffer>): void;\nuse_old_TypeAliasDeclaration_IsoBuffer(\n get_current_TypeAliasDeclaration_IsoBuffer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_IsomorphicPerformance\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_IsomorphicPerformance():\n TypeOnly<old.IsomorphicPerformance>;\ndeclare function use_current_TypeAliasDeclaration_IsomorphicPerformance(\n use: TypeOnly<current.IsomorphicPerformance>): void;\nuse_current_TypeAliasDeclaration_IsomorphicPerformance(\n get_old_TypeAliasDeclaration_IsomorphicPerformance());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_IsomorphicPerformance\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_IsomorphicPerformance():\n TypeOnly<current.IsomorphicPerformance>;\ndeclare function use_old_TypeAliasDeclaration_IsomorphicPerformance(\n use: TypeOnly<old.IsomorphicPerformance>): void;\nuse_old_TypeAliasDeclaration_IsomorphicPerformance(\n get_current_TypeAliasDeclaration_IsomorphicPerformance());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_Trace\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_Trace():\n TypeOnly<old.Trace>;\ndeclare function use_current_ClassDeclaration_Trace(\n use: TypeOnly<current.Trace>): void;\nuse_current_ClassDeclaration_Trace(\n get_old_ClassDeclaration_Trace());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_Trace\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_Trace():\n TypeOnly<current.Trace>;\ndeclare function use_old_ClassDeclaration_Trace(\n use: TypeOnly<old.Trace>): void;\nuse_old_ClassDeclaration_Trace(\n get_current_ClassDeclaration_Trace());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_TypedEventEmitter\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_TypedEventEmitter():\n TypeOnly<old.TypedEventEmitter<any>>;\ndeclare function use_current_ClassDeclaration_TypedEventEmitter(\n use: TypeOnly<current.TypedEventEmitter<any>>): void;\nuse_current_ClassDeclaration_TypedEventEmitter(\n get_old_ClassDeclaration_TypedEventEmitter());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_TypedEventEmitter\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_TypedEventEmitter():\n TypeOnly<current.TypedEventEmitter<any>>;\ndeclare function use_old_ClassDeclaration_TypedEventEmitter(\n use: TypeOnly<old.TypedEventEmitter<any>>): void;\nuse_old_ClassDeclaration_TypedEventEmitter(\n get_current_ClassDeclaration_TypedEventEmitter());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_TypedEventTransform\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_TypedEventTransform():\n TypeOnly<old.TypedEventTransform<any,any>>;\ndeclare function use_current_TypeAliasDeclaration_TypedEventTransform(\n use: TypeOnly<current.TypedEventTransform<any,any>>): void;\nuse_current_TypeAliasDeclaration_TypedEventTransform(\n get_old_TypeAliasDeclaration_TypedEventTransform());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_TypedEventTransform\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_TypedEventTransform():\n TypeOnly<current.TypedEventTransform<any,any>>;\ndeclare function use_old_TypeAliasDeclaration_TypedEventTransform(\n use: TypeOnly<old.TypedEventTransform<any,any>>): void;\nuse_old_TypeAliasDeclaration_TypedEventTransform(\n get_current_TypeAliasDeclaration_TypedEventTransform());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_Uint8ArrayToArrayBuffer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_Uint8ArrayToArrayBuffer():\n TypeOnly<typeof old.Uint8ArrayToArrayBuffer>;\ndeclare function use_current_FunctionDeclaration_Uint8ArrayToArrayBuffer(\n use: TypeOnly<typeof current.Uint8ArrayToArrayBuffer>): void;\nuse_current_FunctionDeclaration_Uint8ArrayToArrayBuffer(\n get_old_FunctionDeclaration_Uint8ArrayToArrayBuffer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_Uint8ArrayToArrayBuffer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_Uint8ArrayToArrayBuffer():\n TypeOnly<typeof current.Uint8ArrayToArrayBuffer>;\ndeclare function use_old_FunctionDeclaration_Uint8ArrayToArrayBuffer(\n use: TypeOnly<typeof old.Uint8ArrayToArrayBuffer>): void;\nuse_old_FunctionDeclaration_Uint8ArrayToArrayBuffer(\n get_current_FunctionDeclaration_Uint8ArrayToArrayBuffer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_Uint8ArrayToString\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_Uint8ArrayToString():\n TypeOnly<typeof old.Uint8ArrayToString>;\ndeclare function use_current_FunctionDeclaration_Uint8ArrayToString(\n use: TypeOnly<typeof current.Uint8ArrayToString>): void;\nuse_current_FunctionDeclaration_Uint8ArrayToString(\n get_old_FunctionDeclaration_Uint8ArrayToString());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_Uint8ArrayToString\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_Uint8ArrayToString():\n TypeOnly<typeof current.Uint8ArrayToString>;\ndeclare function use_old_FunctionDeclaration_Uint8ArrayToString(\n use: TypeOnly<typeof old.Uint8ArrayToString>): void;\nuse_old_FunctionDeclaration_Uint8ArrayToString(\n get_current_FunctionDeclaration_Uint8ArrayToString());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_bufferToString\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_bufferToString():\n TypeOnly<typeof old.bufferToString>;\ndeclare function use_current_VariableDeclaration_bufferToString(\n use: TypeOnly<typeof current.bufferToString>): void;\nuse_current_VariableDeclaration_bufferToString(\n get_old_VariableDeclaration_bufferToString());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_bufferToString\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_bufferToString():\n TypeOnly<typeof current.bufferToString>;\ndeclare function use_old_VariableDeclaration_bufferToString(\n use: TypeOnly<typeof old.bufferToString>): void;\nuse_old_VariableDeclaration_bufferToString(\n get_current_VariableDeclaration_bufferToString());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_fromBase64ToUtf8\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_fromBase64ToUtf8():\n TypeOnly<typeof old.fromBase64ToUtf8>;\ndeclare function use_current_VariableDeclaration_fromBase64ToUtf8(\n use: TypeOnly<typeof current.fromBase64ToUtf8>): void;\nuse_current_VariableDeclaration_fromBase64ToUtf8(\n get_old_VariableDeclaration_fromBase64ToUtf8());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_fromBase64ToUtf8\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_fromBase64ToUtf8():\n TypeOnly<typeof current.fromBase64ToUtf8>;\ndeclare function use_old_VariableDeclaration_fromBase64ToUtf8(\n use: TypeOnly<typeof old.fromBase64ToUtf8>): void;\nuse_old_VariableDeclaration_fromBase64ToUtf8(\n get_current_VariableDeclaration_fromBase64ToUtf8());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_fromUtf8ToBase64\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_fromUtf8ToBase64():\n TypeOnly<typeof old.fromUtf8ToBase64>;\ndeclare function use_current_VariableDeclaration_fromUtf8ToBase64(\n use: TypeOnly<typeof current.fromUtf8ToBase64>): void;\nuse_current_VariableDeclaration_fromUtf8ToBase64(\n get_old_VariableDeclaration_fromUtf8ToBase64());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_fromUtf8ToBase64\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_fromUtf8ToBase64():\n TypeOnly<typeof current.fromUtf8ToBase64>;\ndeclare function use_old_VariableDeclaration_fromUtf8ToBase64(\n use: TypeOnly<typeof old.fromUtf8ToBase64>): void;\nuse_old_VariableDeclaration_fromUtf8ToBase64(\n get_current_VariableDeclaration_fromUtf8ToBase64());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_gitHashFile\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_gitHashFile():\n TypeOnly<typeof old.gitHashFile>;\ndeclare function use_current_FunctionDeclaration_gitHashFile(\n use: TypeOnly<typeof current.gitHashFile>): void;\nuse_current_FunctionDeclaration_gitHashFile(\n get_old_FunctionDeclaration_gitHashFile());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_gitHashFile\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_gitHashFile():\n TypeOnly<typeof current.gitHashFile>;\ndeclare function use_old_FunctionDeclaration_gitHashFile(\n use: TypeOnly<typeof old.gitHashFile>): void;\nuse_old_FunctionDeclaration_gitHashFile(\n get_current_FunctionDeclaration_gitHashFile());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_hashFile\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_hashFile():\n TypeOnly<typeof old.hashFile>;\ndeclare function use_current_FunctionDeclaration_hashFile(\n use: TypeOnly<typeof current.hashFile>): void;\nuse_current_FunctionDeclaration_hashFile(\n get_old_FunctionDeclaration_hashFile());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_hashFile\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_hashFile():\n TypeOnly<typeof current.hashFile>;\ndeclare function use_old_FunctionDeclaration_hashFile(\n use: TypeOnly<typeof old.hashFile>): void;\nuse_old_FunctionDeclaration_hashFile(\n get_current_FunctionDeclaration_hashFile());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_performance\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_performance():\n TypeOnly<typeof old.performance>;\ndeclare function use_current_VariableDeclaration_performance(\n use: TypeOnly<typeof current.performance>): void;\nuse_current_VariableDeclaration_performance(\n get_old_VariableDeclaration_performance());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_performance\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_performance():\n TypeOnly<typeof current.performance>;\ndeclare function use_old_VariableDeclaration_performance(\n use: TypeOnly<typeof old.performance>): void;\nuse_old_VariableDeclaration_performance(\n get_current_VariableDeclaration_performance());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_stringToBuffer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_stringToBuffer():\n TypeOnly<typeof old.stringToBuffer>;\ndeclare function use_current_FunctionDeclaration_stringToBuffer(\n use: TypeOnly<typeof current.stringToBuffer>): void;\nuse_current_FunctionDeclaration_stringToBuffer(\n get_old_FunctionDeclaration_stringToBuffer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_stringToBuffer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_stringToBuffer():\n TypeOnly<typeof current.stringToBuffer>;\ndeclare function use_old_FunctionDeclaration_stringToBuffer(\n use: TypeOnly<typeof old.stringToBuffer>): void;\nuse_old_FunctionDeclaration_stringToBuffer(\n get_current_FunctionDeclaration_stringToBuffer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_toUtf8\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_VariableDeclaration_toUtf8():\n TypeOnly<typeof old.toUtf8>;\ndeclare function use_current_VariableDeclaration_toUtf8(\n use: TypeOnly<typeof current.toUtf8>): void;\nuse_current_VariableDeclaration_toUtf8(\n get_old_VariableDeclaration_toUtf8());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"VariableDeclaration_toUtf8\": {\"backCompat\": false}\n*/\ndeclare function get_current_VariableDeclaration_toUtf8():\n TypeOnly<typeof current.toUtf8>;\ndeclare function use_old_VariableDeclaration_toUtf8(\n use: TypeOnly<typeof old.toUtf8>): void;\nuse_old_VariableDeclaration_toUtf8(\n get_current_VariableDeclaration_toUtf8());\n"]}
|