Skip to content

Commit

Permalink
chore(datetime): rename _common.ts to _date_time_formatter.ts (#4522
Browse files Browse the repository at this point in the history
)
  • Loading branch information
iuioiua authored Mar 26, 2024
1 parent daba77d commit ca6b06b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions datetime/_common.ts → datetime/_date_time_formatter.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

export type Token = {
type Token = {
type: string;
value: string | number;
index: number;
[key: string]: unknown;
};

export interface ReceiverResult {
interface ReceiverResult {
[name: string]: string | number | unknown;
}
export type CallbackResult = {
type CallbackResult = {
type: string;
value: string | number;
[key: string]: unknown;
};
type CallbackFunction = (value: unknown) => CallbackResult;

export type TestResult = { value: unknown; length: number } | undefined;
export type TestFunction = (
type TestResult = { value: unknown; length: number } | undefined;
type TestFunction = (
string: string,
) => TestResult | undefined;

export interface Rule {
interface Rule {
test: TestFunction;
fn: CallbackFunction;
}

export class Tokenizer {
class Tokenizer {
rules: Rule[];

constructor(rules: Rule[] = []) {
Expand Down
2 changes: 1 addition & 1 deletion datetime/format.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { DateTimeFormatter } from "./_common.ts";
import { DateTimeFormatter } from "./_date_time_formatter.ts";

/** Options for {@linkcode format}. */
export interface FormatOptions {
Expand Down
2 changes: 1 addition & 1 deletion datetime/parse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { DateTimeFormatter } from "./_common.ts";
import { DateTimeFormatter } from "./_date_time_formatter.ts";

/**
* Parses a date string using the specified format string.
Expand Down

0 comments on commit ca6b06b

Please sign in to comment.