Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lib/es2018.intl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ declare namespace Intl {
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];
};

// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";

interface NumberFormatPart {
type: ES2018NumberFormatPartType;
type: ES2018NumberFormatPartType | ES2020NumberFormatPartType;
value: string;
}

Expand Down
9 changes: 2 additions & 7 deletions src/lib/es2020.intl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,19 @@ declare namespace Intl {
): UnicodeBCP47LocaleIdentifier[];
};

type ES2020NumberFormatPartType = ES2018NumberFormatPartType | "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
interface NumberFormatPart {
type: ES2020NumberFormatPartType
}

interface NumberFormatOptions {
compactDisplay?: "short" | "long" | undefined;
notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
signDisplay?: "auto" | "never" | "always" | undefined;
unit?: NumberFormatUnit | undefined;
unit?: string | undefined;
unitDisplay?: "short" | "long" | "narrow" | undefined;
}

interface ResolvedNumberFormatOptions {
compactDisplay?: "short" | "long";
notation?: "standard" | "scientific" | "engineering" | "compact";
signDisplay?: "auto" | "never" | "always";
unit?: NumberFormatUnit;
unit?: string;
unitDisplay?: "short" | "long" | "narrow";
}

Expand Down
7 changes: 7 additions & 0 deletions tests/baselines/reference/libCompileChecks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//// [libCompileChecks.ts]
// This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
// as false everywhere.

//// [libCompileChecks.js]
// This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
// as false everywhere.
4 changes: 4 additions & 0 deletions tests/baselines/reference/libCompileChecks.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
=== tests/cases/compiler/libCompileChecks.ts ===
// This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
No type information for this code.// as false everywhere.
No type information for this code.
4 changes: 4 additions & 0 deletions tests/baselines/reference/libCompileChecks.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
=== tests/cases/compiler/libCompileChecks.ts ===
// This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
No type information for this code.// as false everywhere.
No type information for this code.
7 changes: 7 additions & 0 deletions tests/cases/compiler/libCompileChecks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// @lib: esnext, dom
// @target: esnext
// @skipLibCheck: false
// @skipDefaultLibCheck: false

// This test is effectively the 'lib check' for all our .d.ts files because we use skipLibCheck
// as false everywhere.