Skip to content

Commit

Permalink
chore: Copied typings from DefinitelyTyped
Browse files Browse the repository at this point in the history
Adds TypeScript as a dev dependency and specifies `index.d.ts` as typings, with `--noEmit` tests run as part of `test`.
  • Loading branch information
Josh Goldberg committed Dec 18, 2017
1 parent b36f593 commit 5a4e8e0
Show file tree
Hide file tree
Showing 5 changed files with 2,037 additions and 25 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Tests
#

test: test-node
test: test-node test-typescript

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

test-typescript:
@./node_modules/.bin/tsc test/typings.ts index.d.ts --noEmit

#
# Components
#
Expand Down
11 changes: 11 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type AssertionError<T = {}> = Error & T & {
showDiff: boolean;
};

interface AssertionErrorConstructor {
new<T = {}>(message: string, props?: T, ssf?: Function): AssertionError<T>;
}

declare const AssertionError: AssertionErrorConstructor;

export = AssertionError;
Loading

0 comments on commit 5a4e8e0

Please sign in to comment.