Comparing version 0.14.0 to 0.14.1
@@ -236,3 +236,3 @@ /// <reference types="node" /> | ||
*/ | ||
loadDict<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, any>; | ||
loadDict<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, V>; | ||
/** | ||
@@ -239,0 +239,0 @@ * Loads dictionary directly from current slice |
@@ -82,3 +82,3 @@ /// <reference types="node" /> | ||
*/ | ||
static empty<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, any>; | ||
static empty<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, V>; | ||
/** | ||
@@ -91,3 +91,3 @@ * Load dictionary from slice | ||
*/ | ||
static load<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice): Dictionary<K, any>; | ||
static load<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice): Dictionary<K, V>; | ||
/** | ||
@@ -94,0 +94,0 @@ * Low level method for rare dictionaries from system contracts. |
{ | ||
"name": "ton-core", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/ton-community/ton-core.git", |
@@ -388,3 +388,3 @@ import inspectSymbol from 'symbol.inspect'; | ||
*/ | ||
loadDict<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>) { | ||
loadDict<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, V> { | ||
return Dictionary.load(key, value, this); | ||
@@ -399,3 +399,3 @@ } | ||
*/ | ||
loadDictDirect<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>) { | ||
loadDictDirect<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, V> { | ||
return Dictionary.loadDirect(key, value, this); | ||
@@ -402,0 +402,0 @@ } |
@@ -118,4 +118,4 @@ import { Address } from "../address/Address"; | ||
*/ | ||
static empty<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>) { | ||
return new Dictionary(key, value, new Map()); | ||
static empty<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>): Dictionary<K, V> { | ||
return new Dictionary<K, V>(key, value, new Map()); | ||
} | ||
@@ -130,8 +130,8 @@ | ||
*/ | ||
static load<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice) { | ||
static load<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice): Dictionary<K, V> { | ||
let cell = sc.loadMaybeRef(); | ||
if (cell) { | ||
return Dictionary.loadDirect(key, value, cell.beginParse()); | ||
return Dictionary.loadDirect<K, V>(key, value, cell.beginParse()); | ||
} else { | ||
return Dictionary.empty(key, value); | ||
return Dictionary.empty<K, V>(key, value); | ||
} | ||
@@ -149,3 +149,3 @@ } | ||
*/ | ||
static loadDirect<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice) { | ||
static loadDirect<K, V>(key: DictionaryKey<K>, value: DictionaryValue<V>, sc: Slice): Dictionary<K, V> { | ||
let values = parseDict(sc, key.bits, value.parse); | ||
@@ -152,0 +152,0 @@ return new Dictionary(key, value, values); |
718516