Skip to content

Commit

Permalink
Revert exports to match 0.6.4 TS definitions (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn authored and hipstersmoothie committed Nov 26, 2019
1 parent 60b635d commit f5d5167
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
16 changes: 8 additions & 8 deletions packages/jimp/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

declare const DepreciatedJimp: DepreciatedJimp;

export default DepreciatedJimp;
export = DepreciatedJimp;

/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
Expand Down Expand Up @@ -500,15 +500,15 @@ type URLOptions = {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface Bitmap {
interface Bitmap {
data: Buffer;
width: number;
height: number;
}
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface RGB {
interface RGB {
r: number;
g: number;
b: number;
Expand All @@ -517,7 +517,7 @@ export interface RGB {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface RGBA {
interface RGBA {
r: number;
g: number;
b: number;
Expand All @@ -527,7 +527,7 @@ export interface RGBA {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface FontChar {
interface FontChar {
id: number;
x: number;
y: number;
Expand All @@ -543,7 +543,7 @@ export interface FontChar {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface FontInfo {
interface FontInfo {
face: string;
size: number;
bold: number;
Expand All @@ -560,7 +560,7 @@ export interface FontInfo {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface FontCommon {
interface FontCommon {
lineHeight: number;
base: number;
scaleW: number;
Expand All @@ -576,7 +576,7 @@ export interface FontCommon {
/**
* @deprecated Jimp typings for TS <3.1 are being depreciated. Please upgrade your TypeScript version
*/
export interface Font {
interface Font {
chars: {
[char: string]: FontChar;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/jimp/types/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Jimp from 'jimp';
import * as Jimp from 'jimp';

const jimpInst: Jimp = new Jimp('test');

Expand Down
6 changes: 1 addition & 5 deletions packages/jimp/types/ts3.1/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import pluginFn from '@jimp/plugins';
type Types = ReturnType<typeof typeFn>;
type Plugins = ReturnType<typeof pluginFn>;

export { Bitmap, RGB, RGBA };

export { FontChar, FontInfo, FontCommon, Font } from '@jimp/plugin-print';

type IntersectedPluginTypes = UnionToIntersection<
GetPluginVal<Types> | GetPluginVal<Plugins>
>;
Expand All @@ -32,4 +28,4 @@ type Jimp = InstanceType<JimpType> & IntersectedPluginTypes;

declare const Jimp: JimpConstructors & Jimp;

export default Jimp;
export = Jimp;
2 changes: 1 addition & 1 deletion packages/jimp/types/ts3.1/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Jimp from 'jimp';
import * as Jimp from 'jimp';

const jimpInst: Jimp = new Jimp('test');

Expand Down

0 comments on commit f5d5167

Please sign in to comment.