Skip to content

Commit d0c53f2

Browse files
andriolirockwotj
authored andcommitted
Include declaration files (FirebaseExtended#227)
1 parent c762599 commit d0c53f2

6 files changed

+13
-8
lines changed

gulpfile.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,14 @@ gulp.task('ts-compile', ['build-peg'], function() {
8484
// the version built into gulp-typescript.
8585
typescript: require('typescript')
8686
});
87-
return tsProject.src()
87+
var tsResult = tsProject.src()
8888
.pipe(sourcemaps.init())
89-
.pipe(ts(tsProject))
90-
.pipe(sourcemaps.write())
91-
.pipe(gulp.dest(LIB_DIR));
89+
.pipe(ts(tsProject));
90+
91+
return merge([
92+
tsResult.pipe(sourcemaps.write()).pipe(gulp.dest(LIB_DIR)),
93+
tsResult.dts.pipe(gulp.dest(LIB_DIR)),
94+
]);
9295
});
9396

9497
gulp.task('build', ['ts-compile', 'browserify-bolt']);

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"version": "0.8.2",
55
"author": "Firebase (https://firebase.google.com/)",
66
"main": "lib/bolt.js",
7+
"types": "lib/bolt.d.ts",
78
"homepage": "https://github.com/firebase/bolt",
89
"repository": {
910
"type": "git",

src/firebase-rest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export var TIMESTAMP = {
3030
'.sv': 'timestamp'
3131
};
3232

33-
type RequestOptions = {
33+
export type RequestOptions = {
3434
method: string,
3535
print?: string;
3636
}

src/simulator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function rulesSuite(suiteName: string, fnSuite: SuiteFunction) {
4343
new RulesSuite(suiteName, fnSuite).run();
4444
}
4545

46-
class RulesSuite {
46+
export class RulesSuite {
4747
public debug = false;
4848
private users = <{[name: string]: rest.Client}>{};
4949
private tests = <RulesTest[]>[];

src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
type Object = {
16+
export type Object = {
1717
[prop: string]: any
1818
};
1919
export function extend(dest: Object, ...srcs: Object[]): Object {

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"strictNullChecks": true,
88
"preserveConstEnums": true,
99
"inlineSourceMap": true,
10-
"noEmitOnError": true
10+
"noEmitOnError": true,
11+
"declaration": true
1112
},
1213
"exclude": [
1314
"lib",

0 commit comments

Comments
 (0)