Skip to content

Commit

Permalink
chore: update browser-compatible files with declaration (#4560)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua committed Apr 10, 2024
1 parent 42df58a commit 46d9fa5
Show file tree
Hide file tree
Showing 94 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions assert/assert.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_almost_equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_array_includes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { equal } from "./equal.ts";
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";
Expand Down
1 change: 1 addition & 0 deletions assert/assert_equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { equal } from "./equal.ts";
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";
Expand Down
1 change: 1 addition & 0 deletions assert/assert_exists.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_false.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/** Assertion condition for {@linkcode assertFalse}. */
Expand Down
1 change: 1 addition & 0 deletions assert/assert_greater.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_greater_or_equal.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_instance_of.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/** Any constructor */
Expand Down
1 change: 1 addition & 0 deletions assert/assert_is_error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";
import { stripAnsiCode } from "../fmt/colors.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_less.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_less_or_equal.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_match.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_not_equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { CAN_NOT_DISPLAY } from "./_constants.ts";
import { equal } from "./equal.ts";
Expand Down
1 change: 1 addition & 0 deletions assert/assert_not_instance_of.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { assertFalse } from "./assert_false.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_not_match.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_not_strict_equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";
import { format } from "./_format.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_object_match.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { assertEquals } from "./assert_equals.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_rejects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";
import { assertIsError } from "./assert_is_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assert_strict_equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { format } from "./_format.ts";
import { AssertionError } from "./assertion_error.ts";
import { buildMessage, diff, diffstr } from "./_diff.ts";
Expand Down
1 change: 1 addition & 0 deletions assert/assert_string_includes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/assert_throws.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { assertIsError } from "./assert_is_error.ts";
import { AssertionError } from "./assertion_error.ts";

Expand Down
1 change: 1 addition & 0 deletions assert/assertion_error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Error thrown when an assertion fails.
Expand Down
1 change: 1 addition & 0 deletions assert/equal.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
function isKeyedCollection(x: unknown): x is Set<unknown> {
return [Symbol.iterator, "size"].every((k) => k in (x as Set<unknown>));
}
Expand Down
1 change: 1 addition & 0 deletions assert/fail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { assert } from "./assert.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/** A library of assertion functions.
* If the assertion is false an `AssertionError` will be thrown which will
Expand Down
1 change: 1 addition & 0 deletions assert/unimplemented.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions assert/unreachable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { AssertionError } from "./assertion_error.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions async/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Provide help with asynchronous tasks like delays, debouncing, deferring, or
Expand Down
1 change: 1 addition & 0 deletions cli/unicode_width.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
// Ported from unicode_width rust crate, Copyright (c) 2015 The Rust Project Developers. MIT license.

import data from "./_data.json" with { type: "json" };
Expand Down
1 change: 1 addition & 0 deletions collections/omit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Creates a new object by excluding the specified keys from the provided object.
Expand Down
1 change: 1 addition & 0 deletions collections/pick.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Creates a new object by including the specified keys from the provided object.
Expand Down
1 change: 1 addition & 0 deletions console/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Functions for console-related tasks such as TTY text layout.
Expand Down
1 change: 1 addition & 0 deletions console/unicode_width.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
// Ported from unicode_width rust crate, Copyright (c) 2015 The Rust Project Developers. MIT license.

import { unicodeWidth as _unicodeWidth } from "../cli/unicode_width.ts";
Expand Down
1 change: 1 addition & 0 deletions csv/csv_stringify_stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { stringify } from "./stringify.ts";

/** Options for {@linkcode CsvStringifyStream}. */
Expand Down
1 change: 1 addition & 0 deletions data_structures/comparators.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
/** This module is browser compatible. */

/** Compares its two arguments for ascending order using JavaScript's built in comparison operators. */
Expand Down
1 change: 1 addition & 0 deletions data_structures/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Data structures for use in algorithms and other data manipulation.
Expand Down
1 change: 1 addition & 0 deletions dotenv/stringify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Stringify an object into a valid `.env` file format.
Expand Down
1 change: 1 addition & 0 deletions expect/expect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
// Copyright 2019 Allain Lalonde. All rights reserved. ISC License.

import type {
Expand Down
1 change: 1 addition & 0 deletions expect/fn.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
// Copyright 2019 Allain Lalonde. All rights reserved. ISC License.
// deno-lint-ignore-file no-explicit-any ban-types

Expand Down
1 change: 1 addition & 0 deletions http/etag.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/**
* Provides functions for dealing with and matching ETags, including
Expand Down
1 change: 1 addition & 0 deletions http/unstable_signed_cookie.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { decodeHex, encodeHex } from "../encoding/hex.ts";

const encoder = new TextEncoder();
Expand Down
1 change: 1 addition & 0 deletions ini/ini_map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

/** Options for providing formatting marks. */
export interface FormattingOptions {
Expand Down
1 change: 1 addition & 0 deletions ini/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
/**
* {@linkcode parse} and {@linkcode stringify} for handling
* {@link https://en.wikipedia.org/wiki/INI_file | INI} encoded data, such as the
Expand Down
1 change: 1 addition & 0 deletions ini/parse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { IniMap, type ParseOptions } from "./ini_map.ts";
/** Parse an INI config string into an object. Provide formatting options to override the default assignment operator. */
Expand Down
1 change: 1 addition & 0 deletions ini/stringify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { IniMap, type StringifyOptions } from "./ini_map.ts";

Expand Down
1 change: 1 addition & 0 deletions log/base_handler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import {
getLevelByName,
getLevelName,
Expand Down
1 change: 1 addition & 0 deletions log/console_handler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { type LevelName, LogLevels } from "./levels.ts";
import type { LogRecord } from "./logger.ts";
import { blue, bold, red, yellow } from "../fmt/colors.ts";
Expand Down
1 change: 1 addition & 0 deletions log/critical.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { getLogger } from "./get_logger.ts";
import type { GenericFunction } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions log/debug.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { getLogger } from "./get_logger.ts";
import type { GenericFunction } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions log/error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { getLogger } from "./get_logger.ts";
import type { GenericFunction } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions log/formatters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { LogRecord } from "./logger.ts";

export function jsonFormatter(logRecord: LogRecord): string {
Expand Down
1 change: 1 addition & 0 deletions log/get_logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { assert } from "../assert/assert.ts";
import { Logger } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions log/info.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { getLogger } from "./get_logger.ts";
import type { GenericFunction } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions log/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { getLevelByName, getLevelName, LogLevels } from "./levels.ts";
import type { LevelName, LogLevel } from "./levels.ts";
import type { BaseHandler } from "./base_handler.ts";
Expand Down
1 change: 1 addition & 0 deletions log/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import type { BaseHandler } from "./base_handler.ts";
import { DEFAULT_CONFIG, DEFAULT_LEVEL } from "./_config.ts";
Expand Down
1 change: 1 addition & 0 deletions log/warn.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { getLogger } from "./get_logger.ts";
import type { GenericFunction } from "./logger.ts";
Expand Down
1 change: 1 addition & 0 deletions msgpack/decode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import type { ValueType } from "./encode.ts";

Expand Down
1 change: 1 addition & 0 deletions msgpack/encode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import { concat } from "../bytes/concat.ts";

Expand Down
1 change: 1 addition & 0 deletions msgpack/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

export * from "./decode.ts";
export * from "./encode.ts";
1 change: 1 addition & 0 deletions semver/can_parse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { parse } from "./parse.ts";

export function canParse(version: string): boolean {
Expand Down
1 change: 1 addition & 0 deletions semver/compare.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { SemVer } from "./types.ts";
import {
checkIdentifier,
Expand Down
1 change: 1 addition & 0 deletions semver/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { Comparator, SemVer } from "./types.ts";

/**
Expand Down
1 change: 1 addition & 0 deletions semver/difference.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { ReleaseType, SemVer } from "./types.ts";
import { compareIdentifier } from "./_shared.ts";

Expand Down
1 change: 1 addition & 0 deletions semver/equals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import { compare } from "./compare.ts";
import type { SemVer } from "./types.ts";

Expand Down
1 change: 1 addition & 0 deletions semver/format.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.
import type { SemVer } from "./types.ts";
import { isWildcardComparator } from "./_shared.ts";

Expand Down
Loading

0 comments on commit 46d9fa5

Please sign in to comment.