id
int64
0
3.78k
code
stringlengths
13
37.9k
declarations
stringlengths
16
64.6k
600
function getFastGlobEntriesStream(pattern: Pattern, ignore?: Pattern, cwd?: string, options?: Options): Promise<string[]> { const entries: string[] = []; const stream = fg.stream(pattern, getFastGlobOptions(ignore, cwd, options)); return new Promise((resolve, reject) => { stream.on('data', (entry: string) => ent...
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
601
function getFastGlobOptions(ignore?: Pattern, cwd?: string, options?: Options): Options { return { cwd: cwd === undefined ? process.cwd() : cwd, ignore: ignore === undefined ? [] : [ignore], onlyFiles: false, ...options }; }
type Pattern = string;
602
function getFastGlobOptions(ignore?: Pattern, cwd?: string, options?: Options): Options { return { cwd: cwd === undefined ? process.cwd() : cwd, ignore: ignore === undefined ? [] : [ignore], onlyFiles: false, ...options }; }
type Options = OptionsInternal;
603
function getFastGlobOptions(ignore?: Pattern, cwd?: string, options?: Options): Options { return { cwd: cwd === undefined ? process.cwd() : cwd, ignore: ignore === undefined ? [] : [ignore], onlyFiles: false, ...options }; }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
604
function convertPatternGroupsToTasks(positive: PatternsGroup, negative: Pattern[], dynamic: boolean): Task[] { return Object.keys(positive).map((base) => { return convertPatternGroupToTask(base, positive[base], negative, dynamic); }); }
type PatternsGroup = Record<string, Pattern[]>;
605
transform(entry: Entry): EntryItem
type Entry = fsWalk.Entry;
606
(entry: Entry) => EntryItem
type Entry = fsWalk.Entry;
607
(entry: Entry) => entries.push(entry)
type Entry = fsWalk.Entry;
608
constructor(options?: Options) { super(new Settings(options)); }
type Options = OptionsInternal;
609
constructor(options?: Options) { super(new Settings(options)); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
610
function getReader(options?: Options): TestReader { return new TestReader(options); }
type Options = OptionsInternal;
611
function getReader(options?: Options): TestReader { return new TestReader(options); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
612
(error: ErrnoException) => { assert.strictEqual(error.code, 'EPERM'); done(); }
type ErrnoException = NodeJS.ErrnoException;
613
constructor(protected readonly _settings: Settings) { }
class Settings { public readonly absolute: boolean = this._getValue(this._options.absolute, false); public readonly baseNameMatch: boolean = this._getValue(this._options.baseNameMatch, false); public readonly braceExpansion: boolean = this._getValue(this._options.braceExpansion, true); public readonly caseSensitive...
614
protected _isFatalError(error: ErrnoException): boolean { return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors; }
type ErrnoException = NodeJS.ErrnoException;
615
(error: ErrnoException) => { if (options.errorFilter(error)) { return null; } throw error; }
type ErrnoException = NodeJS.ErrnoException;
616
public getRootDirectory(task: Task): string { return this._getRootDirectory(task); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
617
public getReaderOptions(task: Task): ReaderOptions { return this._getReaderOptions(task); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
618
function getProvider(options?: Options): TestProvider { const settings = new Settings(options); return new TestProvider(settings); }
type Options = OptionsInternal;
619
function getProvider(options?: Options): TestProvider { const settings = new Settings(options); return new TestProvider(settings); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
620
public read(task: Task): EntryItem[] { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = this.api(root, task, options); return entries.map(options.transform); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
621
public async read(task: Task): Promise<EntryItem[]> { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const entries = await this.api(root, task, options); return entries.map((entry) => options.transform(entry)); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
622
public abstract read(_task: Task): T
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
623
protected _getRootDirectory(task: Task): string { return path.resolve(this._settings.cwd, task.base); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
624
protected _getReaderOptions(task: Task): ReaderOptions { const basePath = task.base === '.' ? '' : task.base; return { basePath, pathSegmentSeparator: '/', concurrency: this._settings.concurrency, deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), entryFilter: this.entryF...
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
625
function getProvider(options?: Options): TestProvider { return new TestProvider(options); }
type Options = OptionsInternal;
626
function getProvider(options?: Options): TestProvider { return new TestProvider(options); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
627
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
type Entry = fsWalk.Entry;
628
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
class TestProvider extends Provider<Array<{}>> { public read(): Array<{}> { return []; } public getRootDirectory(task: Task): string { return this._getRootDirectory(task); } public getReaderOptions(task: Task): ReaderOptions { return this._getReaderOptions(task); } public getMicromatchOptions(): Microma...
629
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
class TestProvider extends ProviderStream { protected _reader: ReaderStream = sinon.createStubInstance(ReaderStream) as unknown as ReaderStream; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderStream> { return this._reader as unknown as si...
630
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
class TestProvider extends ProviderAsync { protected _reader: ReaderAsync = sinon.createStubInstance(ReaderAsync) as unknown as ReaderAsync; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderStream> { return this._reader as unknown as sinon....
631
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
class TestProvider extends ProviderSync { protected _reader: ReaderSync = sinon.createStubInstance(ReaderSync) as unknown as ReaderSync; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderSync> { return this._reader as unknown as sinon.SinonS...
632
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { const reader = new PassThrough({ objectMode: true }); provider.reader.dynamic.returns(reader); provider.reader.static.returns(reader); reader.push(entry); reader.push(null); return new Promise((resolve, reject) => { ...
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
633
(item: EntryItem) => items.push(item)
type EntryItem = string | Entry;
634
(error: ErrnoException) => { assert.strictEqual(error.code, 'ENOENT'); done(); }
type ErrnoException = NodeJS.ErrnoException;
635
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
type Entry = fsWalk.Entry;
636
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
class TestProvider extends Provider<Array<{}>> { public read(): Array<{}> { return []; } public getRootDirectory(task: Task): string { return this._getRootDirectory(task); } public getReaderOptions(task: Task): ReaderOptions { return this._getReaderOptions(task); } public getMicromatchOptions(): Microma...
637
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
class TestProvider extends ProviderStream { protected _reader: ReaderStream = sinon.createStubInstance(ReaderStream) as unknown as ReaderStream; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderStream> { return this._reader as unknown as si...
638
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
class TestProvider extends ProviderAsync { protected _reader: ReaderAsync = sinon.createStubInstance(ReaderAsync) as unknown as ReaderAsync; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderStream> { return this._reader as unknown as sinon....
639
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
class TestProvider extends ProviderSync { protected _reader: ReaderSync = sinon.createStubInstance(ReaderSync) as unknown as ReaderSync; constructor(options?: Options) { super(new Settings(options)); } public get reader(): sinon.SinonStubbedInstance<ReaderSync> { return this._reader as unknown as sinon.SinonS...
640
function getEntries(provider: TestProvider, task: Task, entry: Entry): Promise<EntryItem[]> { provider.reader.dynamic.resolves([entry]); provider.reader.static.resolves([entry]); return provider.read(task); }
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
641
public read(task: Task): Readable { const root = this._getRootDirectory(task); const options = this._getReaderOptions(task); const source = this.api(root, task, options); const destination = new Readable({ objectMode: true, read: () => { /* noop */ } }); source .once('error', (error: ErrnoException) => d...
type Task = { base: string; dynamic: boolean; patterns: Pattern[]; positive: Pattern[]; negative: Pattern[]; };
642
(error: ErrnoException) => destination.emit('error', error)
type ErrnoException = NodeJS.ErrnoException;
643
(entry: Entry) => destination.emit('data', options.transform(entry))
type Entry = fsWalk.Entry;
644
function getEntryTransformer(options?: Options): EntryTransformer { return new EntryTransformer(new Settings(options)); }
type Options = OptionsInternal;
645
function getEntryTransformer(options?: Options): EntryTransformer { return new EntryTransformer(new Settings(options)); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
646
function getTransformer(options?: Options): EntryTransformerFunction { return getEntryTransformer(options).getTransformer(); }
type Options = OptionsInternal;
647
function getTransformer(options?: Options): EntryTransformerFunction { return getEntryTransformer(options).getTransformer(); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
648
constructor(private readonly _settings: Settings) { }
class Settings { public readonly absolute: boolean = this._getValue(this._options.absolute, false); public readonly baseNameMatch: boolean = this._getValue(this._options.baseNameMatch, false); public readonly braceExpansion: boolean = this._getValue(this._options.braceExpansion, true); public readonly caseSensitive...
649
private _transform(entry: Entry): EntryItem { let filepath = entry.path; if (this._settings.absolute) { filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); filepath = utils.path.unixify(filepath); } if (this._settings.markDirectories && entry.dirent.isDirectory()) { filepath += '/'; }...
type Entry = fsWalk.Entry;
650
constructor(private readonly _settings: Settings, private readonly _micromatchOptions: MicromatchOptions) { }
class Settings { public readonly absolute: boolean = this._getValue(this._options.absolute, false); public readonly baseNameMatch: boolean = this._getValue(this._options.baseNameMatch, false); public readonly braceExpansion: boolean = this._getValue(this._options.braceExpansion, true); public readonly caseSensitive...
651
constructor(private readonly _settings: Settings, private readonly _micromatchOptions: MicromatchOptions) { }
type MicromatchOptions = { dot?: boolean; matchBase?: boolean; nobrace?: boolean; nocase?: boolean; noext?: boolean; noglobstar?: boolean; posix?: boolean; strictSlashes?: boolean; };
652
private _isSkippedSymbolicLink(entry: Entry): boolean { return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); }
type Entry = fsWalk.Entry;
653
function getEntryFilterInstance(options?: Options): EntryFilter { const settings = new Settings(options); return new EntryFilter(settings, { dot: settings.dot }); }
type Options = OptionsInternal;
654
function getEntryFilterInstance(options?: Options): EntryFilter { const settings = new Settings(options); return new EntryFilter(settings, { dot: settings.dot }); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
655
function getFilter(options: FilterOptions): EntryFilterFunction { const negative = options.negative ?? []; return getEntryFilterInstance(options.options).getFilter(options.positive, negative); }
type FilterOptions = { positive: Pattern[]; negative?: Pattern[]; options?: Options; };
656
function getFilter(options: FilterOptions): EntryFilterFunction { const negative = options.negative ?? []; return getEntryFilterInstance(options.options).getFilter(options.positive, negative); }
type FilterOptions = { base?: string; positive: Pattern[]; negative?: Pattern[]; options?: Options; };
657
function getResult(entry: Entry, options: FilterOptions): boolean { const filter = getFilter(options); return filter(entry); }
type Entry = fsWalk.Entry;
658
function getResult(entry: Entry, options: FilterOptions): boolean { const filter = getFilter(options); return filter(entry); }
type FilterOptions = { positive: Pattern[]; negative?: Pattern[]; options?: Options; };
659
function getResult(entry: Entry, options: FilterOptions): boolean { const filter = getFilter(options); return filter(entry); }
type FilterOptions = { base?: string; positive: Pattern[]; negative?: Pattern[]; options?: Options; };
660
function accept(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), true); }
type Entry = fsWalk.Entry;
661
function accept(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), true); }
type FilterOptions = { positive: Pattern[]; negative?: Pattern[]; options?: Options; };
662
function accept(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), true); }
type FilterOptions = { base?: string; positive: Pattern[]; negative?: Pattern[]; options?: Options; };
663
function reject(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), false); }
type Entry = fsWalk.Entry;
664
function reject(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), false); }
type FilterOptions = { positive: Pattern[]; negative?: Pattern[]; options?: Options; };
665
function reject(entry: Entry, options: FilterOptions): void { assert.strictEqual(getResult(entry, options), false); }
type FilterOptions = { base?: string; positive: Pattern[]; negative?: Pattern[]; options?: Options; };
666
constructor(private readonly _settings: Settings, private readonly _micromatchOptions: MicromatchOptions) {}
class Settings { public readonly absolute: boolean = this._getValue(this._options.absolute, false); public readonly baseNameMatch: boolean = this._getValue(this._options.baseNameMatch, false); public readonly braceExpansion: boolean = this._getValue(this._options.braceExpansion, true); public readonly caseSensitive...
667
constructor(private readonly _settings: Settings, private readonly _micromatchOptions: MicromatchOptions) {}
type MicromatchOptions = { dot?: boolean; matchBase?: boolean; nobrace?: boolean; nocase?: boolean; noext?: boolean; noglobstar?: boolean; posix?: boolean; strictSlashes?: boolean; };
668
private _filter(entry: Entry, positiveRe: PatternRe[], negativeRe: PatternRe[]): boolean { if (this._settings.unique && this._isDuplicateEntry(entry)) { return false; } if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { return false; } if (this._isSkippedByAbsoluteNegativePatterns(...
type Entry = fsWalk.Entry;
669
private _isDuplicateEntry(entry: Entry): boolean { return this.index.has(entry.path); }
type Entry = fsWalk.Entry;
670
private _createIndexRecord(entry: Entry): void { this.index.set(entry.path, undefined); }
type Entry = fsWalk.Entry;
671
private _onlyFileFilter(entry: Entry): boolean { return this._settings.onlyFiles && !entry.dirent.isFile(); }
type Entry = fsWalk.Entry;
672
private _onlyDirectoryFilter(entry: Entry): boolean { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); }
type Entry = fsWalk.Entry;
673
private _isNonFatalError(error: ErrnoException): boolean { return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors; }
type ErrnoException = NodeJS.ErrnoException;
674
function getDeepFilterInstance(options?: Options): DeepFilter { const settings = new Settings(options); return new DeepFilter(settings, { dot: settings.dot }); }
type Options = OptionsInternal;
675
function getDeepFilterInstance(options?: Options): DeepFilter { const settings = new Settings(options); return new DeepFilter(settings, { dot: settings.dot }); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
676
function getFilter(options: FilterOptions): EntryFilterFunction { const base = options.base ?? '.'; const negative = options.negative ?? []; return getDeepFilterInstance(options.options).getFilter(base, options.positive, negative); }
type FilterOptions = { positive: Pattern[]; negative?: Pattern[]; options?: Options; };
677
function getFilter(options: FilterOptions): EntryFilterFunction { const base = options.base ?? '.'; const negative = options.negative ?? []; return getDeepFilterInstance(options.options).getFilter(base, options.positive, negative); }
type FilterOptions = { base?: string; positive: Pattern[]; negative?: Pattern[]; options?: Options; };
678
function getErrorFilterInstance(options?: Options): ErrorFilter { const settings = new Settings(options); return new ErrorFilter(settings); }
type Options = OptionsInternal;
679
function getErrorFilterInstance(options?: Options): ErrorFilter { const settings = new Settings(options); return new ErrorFilter(settings); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
680
function getFilter(options?: Options): ErrorFilterFunction { return getErrorFilterInstance(options).getFilter(); }
type Options = OptionsInternal;
681
function getFilter(options?: Options): ErrorFilterFunction { return getErrorFilterInstance(options).getFilter(); }
type Options = { /** * Return the absolute path for entries. * * @default false */ absolute?: boolean; /** * If set to `true`, then patterns without slashes will be matched against * the basename of the path if it contains slashes. * * @default false */ baseNameMatch?: boolean; /** * Enables Ba...
682
private _getPatternSegments(pattern: Pattern): PatternSegment[] { const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); return parts.map((part) => { const dynamic = utils.pattern.isDynamicPattern(part, this._settings); if (!dynamic) { return { dynamic: false, pattern: ...
type Pattern = string;
683
function dayPeriodEnumToHours(dayPeriod: LocaleDayPeriod): number { switch (dayPeriod) { case 'morning': return 4 case 'evening': return 17 case 'pm': case 'noon': case 'afternoon': return 12 case 'am': case 'midnight': case 'night': default: return 0 } }
type LocaleDayPeriod = | 'am' | 'pm' | 'midnight' | 'noon' | 'morning' | 'afternoon' | 'evening' | 'night'
684
public validate<DateType extends Date>( _utcDate: DateType, _options?: ParserOptions ): boolean { return true }
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
685
public abstract set<DateType extends Date>( utcDate: DateType, flags: ParseFlags, options: ParserOptions ): DateType | [DateType, ParseFlags]
interface ParseFlags { timestampIsSet?: boolean era?: number }
686
public abstract set<DateType extends Date>( utcDate: DateType, flags: ParseFlags, options: ParserOptions ): DateType | [DateType, ParseFlags]
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
687
constructor( private value: Value, private validateValue: <DateType extends Date>( utcDate: DateType, value: Value, options: ParserOptions ) => boolean, private setValue: <DateType extends Date>( utcDate: DateType, flags: ParseFlags, value: Value, options: Par...
interface ParseFlags { timestampIsSet?: boolean era?: number }
688
constructor( private value: Value, private validateValue: <DateType extends Date>( utcDate: DateType, value: Value, options: ParserOptions ) => boolean, private setValue: <DateType extends Date>( utcDate: DateType, flags: ParseFlags, value: Value, options: Par...
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
689
<DateType extends Date>( utcDate: DateType, value: Value, options: ParserOptions ) => boolean
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
690
<DateType extends Date>( utcDate: DateType, flags: ParseFlags, value: Value, options: ParserOptions ) => DateType | [DateType, ParseFlags]
interface ParseFlags { timestampIsSet?: boolean era?: number }
691
<DateType extends Date>( utcDate: DateType, flags: ParseFlags, value: Value, options: ParserOptions ) => DateType | [DateType, ParseFlags]
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
692
validate<DateType extends Date>( date: DateType, options: ParserOptions ): boolean { return this.validateValue(date, this.value, options) }
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
693
set<DateType extends Date>( date: DateType, flags: ParseFlags, options: ParserOptions ): DateType | [DateType, ParseFlags] { return this.setValue(date, flags, this.value, options) }
interface ParseFlags { timestampIsSet?: boolean era?: number }
694
set<DateType extends Date>( date: DateType, flags: ParseFlags, options: ParserOptions ): DateType | [DateType, ParseFlags] { return this.setValue(date, flags, this.value, options) }
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
695
set<DateType extends Date>(date: DateType, flags: ParseFlags): DateType { if (flags.timestampIsSet) return date return constructFrom(date, transpose(date, Date)) }
interface ParseFlags { timestampIsSet?: boolean era?: number }
696
protected validate<DateType extends Date>( _utcDate: DateType, _value: Value, _options: ParserOptions ): boolean { return true }
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
697
protected abstract set<DateType extends Date>( date: DateType, flags: ParseFlags, value: Value, options: ParserOptions ): DateType | [DateType, ParseFlags]
interface ParseFlags { timestampIsSet?: boolean era?: number }
698
protected abstract set<DateType extends Date>( date: DateType, flags: ParseFlags, value: Value, options: ParserOptions ): DateType | [DateType, ParseFlags]
type ParserOptions = Required< LocaleOptions & FirstWeekContainsDateOptions & WeekStartOptions >
699
set<DateType extends Date>( date: DateType, flags: ParseFlags, value: number ): DateType { if (flags.timestampIsSet) return date return constructFrom( date, date.getTime() - getTimezoneOffsetInMilliseconds(date) - value ) }
interface ParseFlags { timestampIsSet?: boolean era?: number }