scroll/src/common/types.ts

27 lines
904 B
JavaScript

// ----------------------------------------------------------------------------
// General types
// ----------------------------------------------------------------------------
export interface IPoint {
x: number;
y: number;
}
// ----------------------------------------------------------------------------
// Testing
// ----------------------------------------------------------------------------
/**
* The shared test interface, so tests can be run by both runtimes
*/
export interface ITestBase {
test(name: string, fn: () => void): void;
assertEquals(actual: unknown, expected: unknown): void;
assertNotEquals(actual: unknown, expected: unknown): void;
assertStrictEquals(actual: unknown, expected: unknown): void;
assertExists(actual: unknown): void;
assertInstanceOf(actual: unknown, expectedType: any): void;
assertTrue(actual: boolean): void;
assertFalse(actual: boolean): void;
}