Skip to content

Commit 5a4e8e0

Browse files
author
Josh Goldberg
committed
chore: Copied typings from DefinitelyTyped
Adds TypeScript as a dev dependency and specifies `index.d.ts` as typings, with `--noEmit` tests run as part of `test`.
1 parent b36f593 commit 5a4e8e0

File tree

5 files changed

+2037
-25
lines changed

5 files changed

+2037
-25
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Tests
44
#
55

6-
test: test-node
6+
test: test-node test-typescript
77

88
test-node:
99
@printf "\n ==> [Node.js]\n"
@@ -14,6 +14,9 @@ test-browser:
1414
@make build
1515
@printf "\n\n Open 'test/index.html' in your browser to test.\n\n"
1616

17+
test-typescript:
18+
@./node_modules/.bin/tsc test/typings.ts index.d.ts --noEmit
19+
1720
#
1821
# Components
1922
#

index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
type AssertionError<T = {}> = Error & T & {
2+
showDiff: boolean;
3+
};
4+
5+
interface AssertionErrorConstructor {
6+
new<T = {}>(message: string, props?: T, ssf?: Function): AssertionError<T>;
7+
}
8+
9+
declare const AssertionError: AssertionErrorConstructor;
10+
11+
export = AssertionError;

0 commit comments

Comments
 (0)