Skip to content

Commit

Permalink
#26 - Temporarily split tests and add extension d.ts files to allow p…
Browse files Browse the repository at this point in the history
…eople to relax es6 constraints on loose properties by putting a `[x: string]: any` on base types
  • Loading branch information
AGBrown committed Sep 27, 2015
1 parent 7a4efa4 commit 89c8d6a
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 90 deletions.
12 changes: 12 additions & 0 deletions pouchdb-loose.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

/// <reference path="pouchdb.d.ts" />

declare module pouchdb {
module api {
module methods {
interface BaseDoc {
[x: string]: any;
}
}
}
}
16 changes: 16 additions & 0 deletions pouchdb-plugins.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/// <reference path="pouchdb.d.ts" />

declare module pouchdb {
module options {
module ctor {
/** PouchDB constructor options that can be used on custom plugins and adapters */
interface CustomDb {
/**
* Enables custom options to be passed to plugins or adapters
*/
[x: string]: any;
}
}
}
}
2 changes: 2 additions & 0 deletions pouchdb-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// This file provides "compilation" tests for pouchdb.d.ts as per the DefinitelyTyped best practices

/// <reference path="pouchdb.d.ts" />
/// <reference path="pouchdb-loose.d.ts" />
/// <reference path="pouchdb-plugins.d.ts" />

module promise {
class Foo {
Expand Down
Loading

0 comments on commit 89c8d6a

Please sign in to comment.