Skip to content

Commit

Permalink
More complete JSON value type
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Jan 11, 2018
1 parent 7101a31 commit ee2c9a6
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 22 deletions.
4 changes: 3 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import FakeXMLHttpRequest from "fake-xml-http-request";
import { Params, QueryParams } from "route-recognizer";
import * as JSON from 'json-typescript';

type SetupCallback = (this: Server) => void;
interface SetupConfig {
forcePassthrough: boolean;
Expand All @@ -25,7 +27,7 @@ export type RequestHandler = (
async?: boolean
) => void;

export type ResponseData = [number, { [k: string]: string }, string];
export type ResponseData = [number, JSON.Value, string];
interface ExtraRequestData {
params: Params;
queryParams: QueryParams;
Expand Down
187 changes: 167 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pretender",
"version": "2.0.0",
"version": "2.0.1",
"main": "./pretender.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -38,6 +38,7 @@
},
"dependencies": {
"fake-xml-http-request": "^2.0.0",
"json-typescript": "^1.0.0",
"route-recognizer": "^0.3.3"
},
"jspm": {
Expand Down

0 comments on commit ee2c9a6

Please sign in to comment.