inital
This commit is contained in:
2
node_modules/liquidjs/dist/util/assert.d.ts
generated
vendored
Normal file
2
node_modules/liquidjs/dist/util/assert.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function assert<T>(predicate: T | null | undefined, message?: string | (() => string)): void;
|
||||
export declare function assertEmpty<T>(predicate: T | null | undefined, message?: string): void;
|
1
node_modules/liquidjs/dist/util/assert.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/assert.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
2
node_modules/liquidjs/dist/util/async.d.ts
generated
vendored
Normal file
2
node_modules/liquidjs/dist/util/async.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function toPromise<T>(val: Generator<unknown, T, unknown> | Promise<T> | T): Promise<T>;
|
||||
export declare function toValueSync<T>(val: Generator<unknown, T, unknown> | T): T;
|
1
node_modules/liquidjs/dist/util/async.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/async.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
10
node_modules/liquidjs/dist/util/character.d.ts
generated
vendored
Normal file
10
node_modules/liquidjs/dist/util/character.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const TYPES: number[];
|
||||
export declare const WORD = 1;
|
||||
export declare const OPERATOR = 2;
|
||||
export declare const BLANK = 4;
|
||||
export declare const QUOTE = 8;
|
||||
export declare const INLINE_BLANK = 16;
|
||||
export declare const NUMBER = 32;
|
||||
export declare const SIGN = 64;
|
||||
export declare const PUNCTUATION = 128;
|
||||
export declare function isWord(char: string): boolean;
|
35
node_modules/liquidjs/dist/util/error.d.ts
generated
vendored
Normal file
35
node_modules/liquidjs/dist/util/error.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Token } from '../tokens/token';
|
||||
import { Template } from '../template/template';
|
||||
export declare abstract class LiquidError extends Error {
|
||||
token: Token;
|
||||
context: string;
|
||||
originalError?: Error;
|
||||
constructor(err: Error | string, token: Token);
|
||||
protected update(): void;
|
||||
static is(obj: unknown): obj is LiquidError;
|
||||
}
|
||||
export declare class TokenizationError extends LiquidError {
|
||||
constructor(message: string, token: Token);
|
||||
}
|
||||
export declare class ParseError extends LiquidError {
|
||||
constructor(err: Error, token: Token);
|
||||
}
|
||||
export declare class RenderError extends LiquidError {
|
||||
constructor(err: Error, tpl: Template);
|
||||
static is(obj: any): obj is RenderError;
|
||||
}
|
||||
export declare class LiquidErrors extends LiquidError {
|
||||
errors: RenderError[];
|
||||
constructor(errors: RenderError[]);
|
||||
static is(obj: any): obj is LiquidErrors;
|
||||
}
|
||||
export declare class UndefinedVariableError extends LiquidError {
|
||||
constructor(err: Error, token: Token);
|
||||
}
|
||||
export declare class InternalUndefinedVariableError extends Error {
|
||||
variableName: string;
|
||||
constructor(variableName: string);
|
||||
}
|
||||
export declare class AssertionError extends Error {
|
||||
constructor(message: string);
|
||||
}
|
1
node_modules/liquidjs/dist/util/error.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/error.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
12
node_modules/liquidjs/dist/util/index.d.ts
generated
vendored
Normal file
12
node_modules/liquidjs/dist/util/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export * from './error';
|
||||
export * from './character';
|
||||
export * from './assert';
|
||||
export * from './literal';
|
||||
export * from './underscore';
|
||||
export * from './operator-trie';
|
||||
export * from './type-guards';
|
||||
export * from './async';
|
||||
export * from './strftime';
|
||||
export * from './liquid-date';
|
||||
export * from './limiter';
|
||||
export * from './intl';
|
6
node_modules/liquidjs/dist/util/intl.d.ts
generated
vendored
Normal file
6
node_modules/liquidjs/dist/util/intl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function getDateTimeFormat(): {
|
||||
(locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): Intl.DateTimeFormat;
|
||||
new (locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): Intl.DateTimeFormat;
|
||||
supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions | undefined): string[];
|
||||
readonly prototype: Intl.DateTimeFormat;
|
||||
} | undefined;
|
8
node_modules/liquidjs/dist/util/limiter.d.ts
generated
vendored
Normal file
8
node_modules/liquidjs/dist/util/limiter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export declare class Limiter {
|
||||
private message;
|
||||
private base;
|
||||
private limit;
|
||||
constructor(resource: string, limit: number);
|
||||
use(count: number): void;
|
||||
check(count: number): void;
|
||||
}
|
52
node_modules/liquidjs/dist/util/liquid-date.d.ts
generated
vendored
Normal file
52
node_modules/liquidjs/dist/util/liquid-date.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* A date implementation with timezone info, just like Ruby date
|
||||
*
|
||||
* Implementation:
|
||||
* - create a Date offset by it's timezone difference, avoiding overriding a bunch of methods
|
||||
* - rewrite getTimezoneOffset() to trick strftime
|
||||
*/
|
||||
export declare class LiquidDate {
|
||||
private locale;
|
||||
private timezoneOffset;
|
||||
private timezoneName;
|
||||
private date;
|
||||
private displayDate;
|
||||
private DateTimeFormat;
|
||||
timezoneFixed: boolean;
|
||||
constructor(init: string | number | Date, locale: string, timezone?: number | string);
|
||||
getTime(): number;
|
||||
getMilliseconds(): number;
|
||||
getSeconds(): number;
|
||||
getMinutes(): number;
|
||||
getHours(): number;
|
||||
getDay(): number;
|
||||
getDate(): number;
|
||||
getMonth(): number;
|
||||
getFullYear(): number;
|
||||
toLocaleString(locale?: string, init?: any): string;
|
||||
toLocaleTimeString(locale?: string): string;
|
||||
toLocaleDateString(locale?: string): string;
|
||||
getTimezoneOffset(): number;
|
||||
getTimeZoneName(): string | undefined;
|
||||
getLongMonthName(): string;
|
||||
getShortMonthName(): string;
|
||||
getLongWeekdayName(): string;
|
||||
getShortWeekdayName(): string;
|
||||
valid(): boolean;
|
||||
private format;
|
||||
/**
|
||||
* Create a Date object fixed to it's declared Timezone. Both
|
||||
* - 2021-08-06T02:29:00.000Z and
|
||||
* - 2021-08-06T02:29:00.000+08:00
|
||||
* will always be displayed as
|
||||
* - 2021-08-06 02:29:00
|
||||
* regardless timezoneOffset in JavaScript realm
|
||||
*
|
||||
* The implementation hack:
|
||||
* Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
|
||||
* we create a different Date to trick strftime, it's both simpler and more performant.
|
||||
* Given that a template is expected to be parsed fewer times than rendered.
|
||||
*/
|
||||
static createDateFixedToTimezone(dateString: string, locale: string): LiquidDate;
|
||||
private static getTimezoneOffset;
|
||||
}
|
1
node_modules/liquidjs/dist/util/liquid-date.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/liquid-date.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
11
node_modules/liquidjs/dist/util/literal.d.ts
generated
vendored
Normal file
11
node_modules/liquidjs/dist/util/literal.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { BlankDrop, EmptyDrop, NullDrop } from '../drop';
|
||||
export declare const literalValues: {
|
||||
true: boolean;
|
||||
false: boolean;
|
||||
nil: NullDrop;
|
||||
null: NullDrop;
|
||||
empty: EmptyDrop;
|
||||
blank: BlankDrop;
|
||||
};
|
||||
export type LiteralKey = keyof typeof literalValues;
|
||||
export type LiteralValue = typeof literalValues[LiteralKey];
|
14
node_modules/liquidjs/dist/util/operator-trie.d.ts
generated
vendored
Normal file
14
node_modules/liquidjs/dist/util/operator-trie.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
interface TrieInput<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
interface TrieLeafNode<T> {
|
||||
data: T;
|
||||
end: true;
|
||||
needBoundary?: true;
|
||||
}
|
||||
export interface Trie<T> {
|
||||
[key: string]: Trie<T> | TrieLeafNode<T>;
|
||||
}
|
||||
export type TrieNode<T> = Trie<T> | TrieLeafNode<T>;
|
||||
export declare function createTrie<T = any>(input: TrieInput<T>): Trie<T>;
|
||||
export {};
|
5
node_modules/liquidjs/dist/util/performance.d.ts
generated
vendored
Normal file
5
node_modules/liquidjs/dist/util/performance.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
interface LiquidPerformance {
|
||||
now: () => number;
|
||||
}
|
||||
export declare function getPerformance(): LiquidPerformance;
|
||||
export {};
|
1
node_modules/liquidjs/dist/util/performance.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/performance.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
2
node_modules/liquidjs/dist/util/strftime.d.ts
generated
vendored
Normal file
2
node_modules/liquidjs/dist/util/strftime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { LiquidDate } from './liquid-date';
|
||||
export declare function strftime(d: LiquidDate, formatStr: string): string;
|
1
node_modules/liquidjs/dist/util/strftime.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/strftime.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
12
node_modules/liquidjs/dist/util/type-guards.d.ts
generated
vendored
Normal file
12
node_modules/liquidjs/dist/util/type-guards.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { RangeToken, NumberToken, QuotedToken, LiteralToken, PropertyAccessToken, OutputToken, HTMLToken, TagToken, IdentifierToken, DelimitedToken, OperatorToken } from '../tokens';
|
||||
export declare function isDelimitedToken(val: any): val is DelimitedToken;
|
||||
export declare function isOperatorToken(val: any): val is OperatorToken;
|
||||
export declare function isHTMLToken(val: any): val is HTMLToken;
|
||||
export declare function isOutputToken(val: any): val is OutputToken;
|
||||
export declare function isTagToken(val: any): val is TagToken;
|
||||
export declare function isQuotedToken(val: any): val is QuotedToken;
|
||||
export declare function isLiteralToken(val: any): val is LiteralToken;
|
||||
export declare function isNumberToken(val: any): val is NumberToken;
|
||||
export declare function isPropertyAccessToken(val: any): val is PropertyAccessToken;
|
||||
export declare function isWordToken(val: any): val is IdentifierToken;
|
||||
export declare function isRangeToken(val: any): val is RangeToken;
|
1
node_modules/liquidjs/dist/util/type-guards.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/type-guards.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
36
node_modules/liquidjs/dist/util/underscore.d.ts
generated
vendored
Normal file
36
node_modules/liquidjs/dist/util/underscore.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
export declare const toString: () => string;
|
||||
export declare const hasOwnProperty: (v: PropertyKey) => boolean;
|
||||
export declare function isString(value: any): value is string;
|
||||
export declare function isFunction(value: any): value is Function;
|
||||
export declare function isPromise<T>(val: any): val is Promise<T>;
|
||||
export declare function isIterator(val: any): val is IterableIterator<any>;
|
||||
export declare function escapeRegex(str: string): string;
|
||||
export declare function promisify<T1, T2>(fn: (arg1: T1, cb: (err: Error | null, result: T2) => void) => void): (arg1: T1) => Promise<T2>;
|
||||
export declare function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, cb: (err: Error | null, result: T3) => void) => void): (arg1: T1, arg2: T2) => Promise<T3>;
|
||||
export declare function stringify(value: any): string;
|
||||
export declare function toEnumerable<T = unknown>(val: any): T[];
|
||||
export declare function toArray(val: any): any[];
|
||||
export declare function toValue(value: any): any;
|
||||
export declare function toNumber(value: any): number;
|
||||
export declare function isNumber(value: any): value is number;
|
||||
export declare function toLiquid(value: any): any;
|
||||
export declare function isNil(value: any): boolean;
|
||||
export declare function isUndefined(value: any): boolean;
|
||||
export declare function isArray(value: any): value is any[];
|
||||
export declare function isIterable(value: any): value is Iterable<any>;
|
||||
export declare function forOwn<T>(obj: Record<string, T> | undefined, iteratee: ((val: T, key: string, obj: {
|
||||
[key: string]: T;
|
||||
}) => boolean | void)): Record<string, T>;
|
||||
export declare function last<T>(arr: T[]): T;
|
||||
export declare function last(arr: string): string;
|
||||
export declare function isObject(value: any): value is object;
|
||||
export declare function range(start: number, stop: number, step?: number): number[];
|
||||
export declare function padStart(str: any, length: number, ch?: string): any;
|
||||
export declare function padEnd(str: any, length: number, ch?: string): any;
|
||||
export declare function pad(str: any, length: number, ch: string, add: (str: string, ch: string) => string): any;
|
||||
export declare function identify<T>(val: T): T;
|
||||
export declare function changeCase(str: string): string;
|
||||
export declare function ellipsis(str: string, N: number): string;
|
||||
export declare function caseInsensitiveCompare(a: any, b: any): 0 | 1 | -1;
|
||||
export declare function argumentsToValue<F extends (...args: any) => any, T>(fn: F): (this: T, ...args: Parameters<F>) => any;
|
||||
export declare function escapeRegExp(text: string): string;
|
1
node_modules/liquidjs/dist/util/underscore.spec.d.ts
generated
vendored
Normal file
1
node_modules/liquidjs/dist/util/underscore.spec.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
Reference in New Issue
Block a user