Skip to content

Commit

Permalink
Merge pull request #11 from JoshuaKGoldberg/types
Browse files Browse the repository at this point in the history
Copied typings from DefinitelyTyped
  • Loading branch information
keithamus authored Jan 2, 2018
2 parents fb52715 + 5a4e8e0 commit e8b00f7
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 e8b00f7

Please sign in to comment.