Remove src dts files and correct exports

Esbuild doesn't appear to play nice with dts files and when they are regular ts
files they require the exports
This commit is contained in:
Daniel Imms
2024-07-05 06:51:00 -07:00
parent 795839cbe1
commit 7b2e8a6ce1
13 changed files with 24 additions and 9 deletions
+16 -1
View File
@@ -7,9 +7,24 @@ import test from '@playwright/test';
import { readFileSync } from 'fs';
import { FINALIZER, introducer, sixelEncode } from 'sixel';
import { ITestContext, createTestContext, openTerminal, pollFor } from '../../../out-test/playwright/TestUtils';
import { IImageAddonOptions } from '../src/Types';
import { deepStrictEqual, ok, strictEqual } from 'assert';
/**
* Plugin ctor options.
*/
export interface IImageAddonOptions {
enableSizeReports: boolean;
pixelLimit: number;
storageLimit: number;
showPlaceholder: boolean;
sixelSupport: boolean;
sixelScrolling: boolean;
sixelPaletteLimit: number;
sixelSizeLimit: number;
iipSupport: boolean;
iipSizeLimit: number;
}
// eslint-disable-next-line
declare const ImageAddon: {
new(options?: Partial<IImageAddonOptions>): any;
@@ -129,7 +129,7 @@ export interface ILinkifier2 extends IDisposable {
readonly currentLink: ILinkWithState | undefined;
}
interface ILink {
export interface ILink {
range: IBufferRange;
text: string;
decorations?: ILinkDecorations;
@@ -139,17 +139,17 @@ interface ILink {
dispose?(): void;
}
interface ILinkDecorations {
export interface ILinkDecorations {
pointerCursor: boolean;
underline: boolean;
}
interface IBufferRange {
export interface IBufferRange {
start: IBufferCellPosition;
end: IBufferCellPosition;
}
interface IBufferCellPosition {
export interface IBufferCellPosition {
x: number;
y: number;
}
+1 -1
View File
@@ -5,7 +5,7 @@
import { assert } from 'chai';
import { InputHandler } from 'common/InputHandler';
import { IBufferLine, IAttributeData, IColorEvent, ColorIndex, ColorRequestType, SpecialColorIndex } from 'common/Types';
import { IBufferLine, IAttributeData, IColorEvent, ColorRequestType, SpecialColorIndex } from 'common/Types';
import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
import { CellData } from 'common/buffer/CellData';
import { Attributes, BgFlags, UnderlineStyle } from 'common/buffer/Constants';
+1 -1
View File
@@ -3456,6 +3456,6 @@ class DirtyRowTracker implements IDirtyRowTracker {
}
}
function isValidColorIndex(value: number): value is ColorIndex {
export function isValidColorIndex(value: number): value is ColorIndex {
return 0 <= value && value < 256;
}
@@ -425,8 +425,8 @@ type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] exte
: Enumerate<N, [...Acc, Acc['length']]>;
type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
type ColorIndex = IntRange<0, 256>; // number from 0 to 255
type AllColorIndex = ColorIndex | SpecialColorIndex;
export type ColorIndex = IntRange<0, 256>; // number from 0 to 255
export type AllColorIndex = ColorIndex | SpecialColorIndex;
export const enum SpecialColorIndex {
FOREGROUND = 256,
BACKGROUND = 257,