Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@genesis-xyz/overlay

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@genesis-xyz/overlay - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

2

package.json
{
"name": "@genesis-xyz/overlay",
"version": "0.0.6",
"version": "0.0.7",
"main": "src/index.ts",

@@ -5,0 +5,0 @@ "devDependencies": {

import { AssetIO } from './AssetIO';
import { AssetRef } from './AssetRef';
import { AssetResult } from './AssetResult';

@@ -10,3 +9,3 @@

tag: AssetTag,
get: <DepT>(ref: AssetRef<DepT>) => Promise<DepT>
get: <DepT>(asset: Asset<DepT>, tag: AssetTag) => Promise<DepT>
) => Promise<AssetResult<T>>;

@@ -13,0 +12,0 @@

@@ -12,3 +12,7 @@ export type AssetResult<T> =

// A class all AssetResults extend, which can be used for runtime type checking via instanceof
export class BaseAssetResult {}
export class BaseAssetResult {
// NOTE: This private property is here so that an AssetFn is only correct if it returns a type extending BaseAssetResult...
// Without it, returning any type is considered valid.
private _type = 'AssetResult' as const;
}

@@ -15,0 +19,0 @@ /** The asset was resolved successfully */

@@ -7,3 +7,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

import { AssetResolver } from './AssetResolver';
import { AssetResultRejected, AssetResultResolved } from './AssetResult';
import { AssetResultResolved } from './AssetResult';

@@ -44,3 +44,3 @@ // Create a storage object for the assets

console.log('AssetB', tagNum);
const a = await get({ asset: AssetA, tag });
const a = await get(AssetA, tag);
return new AssetResultResolved(tagNum + a);

@@ -56,4 +56,4 @@ },

console.log('AssetC', tagNum);
const a = await get({ asset: AssetA, tag });
const b = await get({ asset: AssetB, tag });
const a = await get(AssetA, tag);
const b = await get(AssetB, tag);
if (Math.random() > 0.5) {

@@ -72,4 +72,4 @@ throw new Error('NO NO');

console.log('AssetD', tagNum);
const b = await get({ asset: AssetB, tag });
const c = await get({ asset: AssetC, tag });
const b = await get(AssetB, tag);
const c = await get(AssetC, tag);
return new AssetResultResolved(tagNum + b + c);

@@ -76,0 +76,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc