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

@ealmansi/jagger

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ealmansi/jagger - npm Package Compare versions

Comparing version 0.1.28 to 0.1.29

12

js/Jagger.d.ts

@@ -9,12 +9,6 @@ export declare namespace Jagger {

}
function instance<Class extends new (...args: any) => any>(klass: Class): {
(...args: ConstructorParameters<Class>): InstanceType<Class>;
};
function as<SubType extends Type, Type>(): {
(value: SubType): Type;
};
function array<Values extends Array<Type>, Type>(): {
(...values: Values): Array<Type>;
};
function instance<Class extends new (...args: any) => any>(klass: Class): Provider<ConstructorParameters<Class>, InstanceType<Class>>;
function as<SubType extends Type, Type>(): Provider<[SubType], Type>;
function array<Values extends Type[], Type>(): Provider<Values, Type[]>;
}
//# sourceMappingURL=Jagger.d.ts.map

@@ -7,5 +7,7 @@ import ts from "typescript";

const componentModuleInstances = new Map();
const componentModuleInstancesSet = new Map();
const componentTypeResolutions = new Map();
for (const component of graph.components) {
componentModuleInstances.set(component, []);
componentModuleInstancesSet.set(component, new Set());
componentTypeResolutions.set(component, []);

@@ -42,4 +44,10 @@ const module = orThrow(graph.componentModule.get(component));

resolverTypeResolution.set(resolver, returnTypeResolution);
const moduleInstancesSet = orThrow(componentModuleInstancesSet.get(component));
const moduleInstances = orThrow(componentModuleInstances.get(component));
for (const typeResolutionModule of getTypeResolutionModules(returnTypeResolution)) {
orThrow(componentModuleInstances.get(component)).push(typeResolutionModule);
if (moduleInstancesSet.has(typeResolutionModule)) {
continue;
}
moduleInstancesSet.add(typeResolutionModule);
moduleInstances.push(typeResolutionModule);
}

@@ -46,0 +54,0 @@ for (const typeResolution of getTypeResolutionTypeResolutions(returnTypeResolution)) {

{
"name": "@ealmansi/jagger",
"version": "0.1.28",
"version": "0.1.29",
"description": "WIP",

@@ -5,0 +5,0 @@ "files": [

@@ -27,3 +27,3 @@ # @ealmansi/jagger

class Logger {
export class Logger {
constructor() {}

@@ -35,3 +35,3 @@ log(message: string): void {

class App {
export class App {
constructor(private readonly logger: Logger) {}

@@ -43,3 +43,3 @@ start() {

class AppModule extends Jagger.Module {
export class AppModule extends Jagger.Module {
provideLogger = Jagger.instance(Logger);

@@ -49,9 +49,10 @@ provideApp = Jagger.instance(App);

abstract class AppComponent extends Jagger.Component {
export abstract class AppComponent extends Jagger.Component {
static module: AppModule;
abstract provideApp(): App;
abstract buildApp(): App;
}
// in index.ts
const app = new AppComponentImpl().provideApp();
app.start(); // App started!
```

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

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