@trpc/client
Advanced tools
Comparing version 11.0.0-alpha-tmp-issues-6374.697 to 11.0.0-alpha-tmp-issues-6374.698
{ | ||
"bundleSize": 66394, | ||
"bundleOrigSize": 84055, | ||
"bundleReduction": 21.01, | ||
"bundleSize": 66400, | ||
"bundleOrigSize": 83904, | ||
"bundleReduction": 20.86, | ||
"modules": [ | ||
@@ -107,7 +107,7 @@ { | ||
"id": "/src/internals/TRPCUntypedClient.ts", | ||
"size": 3295, | ||
"origSize": 4748, | ||
"size": 3402, | ||
"origSize": 4855, | ||
"renderedExports": [ | ||
"TRPCUntypedClient", | ||
"untypedClientSymbol" | ||
"untypedClientMarker" | ||
], | ||
@@ -119,4 +119,4 @@ "removedExports": [], | ||
], | ||
"percent": 4.96, | ||
"reduction": 30.6 | ||
"percent": 5.12, | ||
"reduction": 29.93 | ||
}, | ||
@@ -169,4 +169,4 @@ { | ||
"id": "/src/createTRPCClient.ts", | ||
"size": 1415, | ||
"origSize": 5404, | ||
"size": 1314, | ||
"origSize": 5146, | ||
"renderedExports": [ | ||
@@ -182,4 +182,4 @@ "clientCallTypeToProcedureType", | ||
], | ||
"percent": 2.13, | ||
"reduction": 73.82 | ||
"percent": 1.98, | ||
"reduction": 74.47 | ||
}, | ||
@@ -186,0 +186,0 @@ { |
@@ -29,3 +29,3 @@ 'use strict'; | ||
} | ||
if (key === TRPCUntypedClient.untypedClientSymbol) { | ||
if (key === TRPCUntypedClient.untypedClientMarker) { | ||
return client; | ||
@@ -45,5 +45,4 @@ } | ||
*/ function getUntypedClient(client) { | ||
// Note: don't use `instanceof TRPCUntypedClient` as it won't work if @trpc/client isn't hoisted | ||
if (client[TRPCUntypedClient.untypedClientSymbol]) { | ||
return client[TRPCUntypedClient.untypedClientSymbol]; | ||
if (client[TRPCUntypedClient.untypedClientMarker]) { | ||
return client[TRPCUntypedClient.untypedClientMarker]; | ||
} | ||
@@ -50,0 +49,0 @@ return client; |
@@ -41,3 +41,7 @@ import type { Unsubscribable } from '@trpc/server/observable'; | ||
} | ||
export declare const untypedClientSymbol = "__internal_untypedClient"; | ||
/** | ||
* @internal | ||
* This would ideally be a Symbol but that won't work when @trpc/client isn't hoisted | ||
*/ | ||
export declare const untypedClientMarker = "__internal_untypedClient"; | ||
//# sourceMappingURL=TRPCUntypedClient.d.ts.map |
@@ -115,5 +115,8 @@ 'use strict'; | ||
} | ||
const untypedClientSymbol = '__internal_untypedClient'; | ||
/** | ||
* @internal | ||
* This would ideally be a Symbol but that won't work when @trpc/client isn't hoisted | ||
*/ const untypedClientMarker = '__internal_untypedClient'; | ||
exports.TRPCUntypedClient = TRPCUntypedClient; | ||
exports.untypedClientSymbol = untypedClientSymbol; | ||
exports.untypedClientMarker = untypedClientMarker; |
{ | ||
"name": "@trpc/client", | ||
"version": "11.0.0-alpha-tmp-issues-6374.697+41465ba29", | ||
"version": "11.0.0-alpha-tmp-issues-6374.698+f5be6c9a3", | ||
"description": "The tRPC client library", | ||
@@ -80,7 +80,7 @@ "author": "KATT", | ||
"peerDependencies": { | ||
"@trpc/server": "11.0.0-alpha-tmp-issues-6374.697+41465ba29", | ||
"@trpc/server": "11.0.0-alpha-tmp-issues-6374.698+f5be6c9a3", | ||
"typescript": ">=5.7.2" | ||
}, | ||
"devDependencies": { | ||
"@trpc/server": "11.0.0-alpha-tmp-issues-6374.697+41465ba29", | ||
"@trpc/server": "11.0.0-alpha-tmp-issues-6374.698+f5be6c9a3", | ||
"@types/isomorphic-fetch": "^0.0.39", | ||
@@ -103,3 +103,3 @@ "@types/node": "^22.9.0", | ||
], | ||
"gitHead": "41465ba29ad50fa0a28146f8d8fb85cde796c562" | ||
"gitHead": "f5be6c9a3f4f829bc82c9bf4ac7875b7ade2b9ef" | ||
} |
@@ -25,3 +25,3 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ | ||
TRPCUntypedClient, | ||
untypedClientSymbol, | ||
untypedClientMarker, | ||
} from './internals/TRPCUntypedClient'; | ||
@@ -167,3 +167,3 @@ import type { TRPCClientError } from './TRPCClientError'; | ||
} | ||
if (key === untypedClientSymbol) { | ||
if (key === untypedClientMarker) { | ||
return client; | ||
@@ -193,10 +193,6 @@ } | ||
}> { | ||
// Note: don't use `instanceof TRPCUntypedClient` as it won't work if @trpc/client isn't hoisted | ||
if ((client as any)[untypedClientSymbol]) { | ||
return (client as any)[untypedClientSymbol]; | ||
if ((client as any)[untypedClientMarker]) { | ||
return (client as any)[untypedClientMarker]; | ||
} | ||
return client as TRPCUntypedClient<{ | ||
errorShape: TRouter['_def']['_config']['$types']['errorShape']; | ||
transformer: TRouter['_def']['_config']['$types']['transformer']; | ||
}>; | ||
return client as any; | ||
} |
@@ -176,2 +176,6 @@ import type { | ||
export const untypedClientSymbol = '__internal_untypedClient'; | ||
/** | ||
* @internal | ||
* This would ideally be a Symbol but that won't work when @trpc/client isn't hoisted | ||
*/ | ||
export const untypedClientMarker = '__internal_untypedClient'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
8065
309117