-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[types] Add
.js
extension to file imports (#333)
* [types] Add `.js` extension to file imports Fixes problems when `moduleResolution` in tsconfig.json is set to NodeNext. * [types] Add extensions to `import()` types * [types] Add missing imports Weirdly, TypeScript only complains about these imports when `moduleResolution` is set to `NodeNext`. I guess that whatever the default module resolution system is can infer that they're from the augmented module, but that doesn't seem to work on `NodeNext`.
- Loading branch information
1 parent
08fce48
commit f71745c
Showing
74 changed files
with
183 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default } from "../src"; | ||
export { default } from "../src/index.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { White } from "./adapt"; | ||
import { White } from "./adapt.js"; | ||
|
||
export interface CAT { | ||
id: string; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { PlainColorObject } from "./color"; | ||
import { PlainColorObject } from "./color.js"; | ||
|
||
export default function clone(color: PlainColorObject): PlainColorObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
export type Algorithms = keyof typeof import(".") extends `contrast${infer Alg}` | ||
? Alg | ||
: string; | ||
export type Algorithms = | ||
keyof typeof import("./index.js") extends `contrast${infer Alg}` | ||
? Alg | ||
: string; | ||
|
||
export { default as contrastWCAG21 } from "./WCAG21"; | ||
export { default as contrastAPCA } from "./APCA"; | ||
export { default as contrastMichelson } from "./Michelson"; | ||
export { default as contrastWeber } from "./Weber"; | ||
export { default as contrastLstar } from "./Lstar"; | ||
export { default as contrastDeltaPhi } from "./deltaPhi"; | ||
export { default as contrastWCAG21 } from "./WCAG21.js"; | ||
export { default as contrastAPCA } from "./APCA.js"; | ||
export { default as contrastMichelson } from "./Michelson.js"; | ||
export { default as contrastWeber } from "./Weber.js"; | ||
export { default as contrastLstar } from "./Lstar.js"; | ||
export { default as contrastDeltaPhi } from "./deltaPhi.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { ColorTypes } from "./color"; | ||
import { ColorTypes } from "./color.js"; | ||
|
||
export default function equals(color1: ColorTypes, color2: ColorTypes): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import Color, { ColorObject } from "./color"; | ||
import { Ref } from "./space"; | ||
import Color, { ColorObject } from "./color.js"; | ||
import { Ref } from "./space.js"; | ||
|
||
export default function get(color: Color | ColorObject, prop: Ref): number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { PlainColorObject, ColorTypes } from "./color"; | ||
import { PlainColorObject, ColorTypes } from "./color.js"; | ||
|
||
export default function getColor(color: ColorTypes): PlainColorObject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
export { default as ColorSpace } from "./space"; | ||
export { default as RGBColorSpace } from "./rgbspace"; | ||
export { default as hooks, Hooks } from "./hooks"; | ||
export { default as defaults } from "./defaults"; | ||
export { default as getColor } from "./getColor"; | ||
export { default as get } from "./get"; | ||
export { default as getAll } from "./getAll"; | ||
export { default as set } from "./set"; | ||
export { default as setAll } from "./setAll"; | ||
export { default as parse } from "./parse"; | ||
export { default as to } from "./to"; | ||
export { default as serialize } from "./serialize"; | ||
export { default as display } from "./display"; | ||
export { default as inGamut } from "./inGamut"; | ||
export { default as toGamut } from "./toGamut"; | ||
export { default as distance } from "./distance"; | ||
export { default as equals } from "./equals"; | ||
export { default as contrast } from "./contrast"; | ||
export { default as clone } from "./clone"; | ||
export { getLuminance, setLuminance } from "./luminance"; | ||
export { uv, xy } from "./chromaticity"; | ||
export { default as deltaE } from "./deltaE"; | ||
export { mix, steps, range, isRange } from "./interpolation"; | ||
export { default as ColorSpace } from "./space.js"; | ||
export { default as RGBColorSpace } from "./rgbspace.js"; | ||
export { default as hooks, Hooks } from "./hooks.js"; | ||
export { default as defaults } from "./defaults.js"; | ||
export { default as getColor } from "./getColor.js"; | ||
export { default as get } from "./get.js"; | ||
export { default as getAll } from "./getAll.js"; | ||
export { default as set } from "./set.js"; | ||
export { default as setAll } from "./setAll.js"; | ||
export { default as parse } from "./parse.js"; | ||
export { default as to } from "./to.js"; | ||
export { default as serialize } from "./serialize.js"; | ||
export { default as display } from "./display.js"; | ||
export { default as inGamut } from "./inGamut.js"; | ||
export { default as toGamut } from "./toGamut.js"; | ||
export { default as distance } from "./distance.js"; | ||
export { default as equals } from "./equals.js"; | ||
export { default as contrast } from "./contrast.js"; | ||
export { default as clone } from "./clone.js"; | ||
export { getLuminance, setLuminance } from "./luminance.js"; | ||
export { uv, xy } from "./chromaticity.js"; | ||
export { default as deltaE } from "./deltaE.js"; | ||
export { mix, steps, range, isRange } from "./interpolation.js"; | ||
|
||
export * from "./contrast/index"; | ||
export * from "./deltaE/index"; | ||
export { default as deltaEMethods } from "./deltaE/index"; | ||
export * from "./variations"; | ||
export * from "./spaces/index-fn"; | ||
export * from "./contrast/index.js"; | ||
export * from "./deltaE/index.js"; | ||
export { default as deltaEMethods } from "./deltaE/index.js"; | ||
export * from "./variations.js"; | ||
export * from "./spaces/index-fn.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.