@instantdb/core
Advanced tools
Comparing version 0.11.2 to 0.11.3
export { graph, entity, string, number, boolean, json, any, InstaQLQueryResult, }; | ||
declare function graph<EntitiesWithoutLinks extends EntitiesDef, const Links extends LinksDef<any>>(appId: string, entities: EntitiesWithoutLinks, links: Links): InstantGraph<EntitiesWithLinks<EntitiesWithoutLinks, Links>>; | ||
declare function graph<EntitiesWithoutLinks extends EntitiesDef, const Links extends LinksDef<any>>(appId: string, entities: EntitiesWithoutLinks, links: Links): InstantGraph<EntitiesWithLinks<EntitiesWithoutLinks, Links>, Links>; | ||
declare function entity<A extends AttrsDefs>(attrs: A): EntityDef<A, {}>; | ||
@@ -32,6 +32,7 @@ declare function string(): DataAttrDef<string, true>; | ||
} | ||
declare class InstantGraph<Entities extends EntitiesDef> { | ||
declare class InstantGraph<Entities extends EntitiesDef, Links extends LinksDef<EntitiesDef>> { | ||
appId: string; | ||
entities: Entities; | ||
constructor(appId: string, entities: Entities); | ||
links: Links; | ||
constructor(appId: string, entities: Entities, links: Links); | ||
} | ||
@@ -38,0 +39,0 @@ type ValueTypes = "string" | "number" | "boolean" | "json"; |
@@ -9,3 +9,3 @@ export { | ||
function graph(appId, entities, links) { | ||
return new InstantGraph(appId, enrichEntitiesWithLinks(entities, links)); | ||
return new InstantGraph(appId, enrichEntitiesWithLinks(entities, links), links); | ||
} | ||
@@ -79,7 +79,8 @@ function entity(attrs) { | ||
class InstantGraph { | ||
constructor(appId, entities) { | ||
constructor(appId, entities, links) { | ||
this.appId = appId; | ||
this.entities = entities; | ||
this.links = links; | ||
} | ||
} | ||
//# sourceMappingURL=schema.js.map |
export { graph, entity, string, number, boolean, json, any, InstaQLQueryResult, }; | ||
declare function graph<EntitiesWithoutLinks extends EntitiesDef, const Links extends LinksDef<any>>(appId: string, entities: EntitiesWithoutLinks, links: Links): InstantGraph<EntitiesWithLinks<EntitiesWithoutLinks, Links>>; | ||
declare function graph<EntitiesWithoutLinks extends EntitiesDef, const Links extends LinksDef<any>>(appId: string, entities: EntitiesWithoutLinks, links: Links): InstantGraph<EntitiesWithLinks<EntitiesWithoutLinks, Links>, Links>; | ||
declare function entity<A extends AttrsDefs>(attrs: A): EntityDef<A, {}>; | ||
@@ -32,6 +32,7 @@ declare function string(): DataAttrDef<string, true>; | ||
} | ||
declare class InstantGraph<Entities extends EntitiesDef> { | ||
declare class InstantGraph<Entities extends EntitiesDef, Links extends LinksDef<EntitiesDef>> { | ||
appId: string; | ||
entities: Entities; | ||
constructor(appId: string, entities: Entities); | ||
links: Links; | ||
constructor(appId: string, entities: Entities, links: Links); | ||
} | ||
@@ -38,0 +39,0 @@ type ValueTypes = "string" | "number" | "boolean" | "json"; |
@@ -13,3 +13,3 @@ "use strict"; | ||
function graph(appId, entities, links) { | ||
return new InstantGraph(appId, enrichEntitiesWithLinks(entities, links)); | ||
return new InstantGraph(appId, enrichEntitiesWithLinks(entities, links), links); | ||
} | ||
@@ -83,7 +83,8 @@ function entity(attrs) { | ||
class InstantGraph { | ||
constructor(appId, entities) { | ||
constructor(appId, entities, links) { | ||
this.appId = appId; | ||
this.entities = entities; | ||
this.links = links; | ||
} | ||
} | ||
//# sourceMappingURL=schema.js.map |
{ | ||
"name": "@instantdb/core", | ||
"version": "0.11.2", | ||
"version": "0.11.3", | ||
"description": "Instant's core local abstraction", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -25,2 +25,3 @@ export { | ||
enrichEntitiesWithLinks<EntitiesWithoutLinks, Links>(entities, links), | ||
links, | ||
); | ||
@@ -138,6 +139,10 @@ } | ||
class InstantGraph<Entities extends EntitiesDef> { | ||
class InstantGraph< | ||
Entities extends EntitiesDef, | ||
Links extends LinksDef<EntitiesDef>, | ||
> { | ||
constructor( | ||
public appId: string, | ||
public entities: Entities, | ||
public links: Links, | ||
) {} | ||
@@ -144,0 +149,0 @@ } |
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
2918687
41538