diff --git a/lib/plankton/plankton.d.ts b/lib/plankton/plankton.d.ts index 1d19b5b..8414b5a 100644 --- a/lib/plankton/plankton.d.ts +++ b/lib/plankton/plankton.d.ts @@ -1,11 +1,11 @@ /** * @author fenris */ -type int = number; +declare type int = number; /** * @author fenris */ -type float = number; +declare type float = number; declare class Buffer { constructor(x: string, modifier?: string); toString(modifier?: string): string; @@ -19,7 +19,7 @@ declare namespace lib_plankton.base { /** * @author fenris */ -type type_pseudopointer = { +declare type type_pseudopointer = { value: type_value; }; /** @@ -2002,7 +2002,7 @@ declare namespace lib_plankton.storage.memory { clear(): Promise; write(key: any, value: any): Promise; delete(key: any): Promise; - read(key: any): Promise>; + read(key: any): Promise; search(term: any): Promise<{ key: string; preview: string; @@ -3861,6 +3861,9 @@ declare namespace lib_plankton.pit { function to_ywd(pit: type_pit, { "timezone_shift": option_timezone_shift, }?: { timezone_shift?: int; }): type_ywd; + /** + */ + function number_of_weeks(year: int): int; /** * computes the point in time for switching to central european summer time * diff --git a/lib/plankton/plankton.js b/lib/plankton/plankton.js index 11c3060..eb95740 100644 --- a/lib/plankton/plankton.js +++ b/lib/plankton/plankton.js @@ -2241,7 +2241,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { + while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -9970,12 +9970,6 @@ var lib_plankton; * @author fenris */ class class_relation { - /** - * @author fenris - */ - check(value, reference) { - return this.predicate(value, reference); - } /** * @author fenris */ @@ -9985,6 +9979,12 @@ var lib_plankton; this.name = name; this.predicate = predicate; } + /** + * @author fenris + */ + check(value, reference) { + return this.predicate(value, reference); + } /** * @author fenris */ @@ -11654,6 +11654,17 @@ var lib_plankton; ]); } pit_1.to_ywd = to_ywd; + /** + */ + function number_of_weeks(year) { + return lib_plankton.call.convey(year, [ + x => from_ywd({ "year": (x + 1), "week": 1, "day": 6 }), + x => shift_week(x, -1), + to_ywd, + x => x.week, + ]); + } + pit_1.number_of_weeks = number_of_weeks; /** * computes the point in time for switching to central european summer time * @@ -11740,7 +11751,8 @@ var lib_plankton; "time": ((datetime.time === null) ? null - : datetime_shifted.time) + : + datetime_shifted.time) }; } }