Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declarations for Typescripts modules #41

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Hugh Willson
Copyright (c) 2023 Jesus Berrio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Easily stub out Meteor collections with in-memory local collections. The idea he
## Installation

```
meteor add hwillson:stub-collections
meteor add meteor-stub-collections-ts
```

### Usage via ES6 import
Expand Down
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { extend } from 'lodash';
import { Mongo } from 'meteor/mongo';

interface Document extends Object {}

interface IStubCollections {
add: <T extends Document>(collections: Mongo.Collection<T>[]) => void;
stub: <T extends Document>(collections?: Mongo.Collection<T>[]) => void;
restore: () => void;
}

declare const StubCollections: IStubCollections;

export default StubCollections;
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Mongo } from 'meteor/mongo';
import { Random } from 'meteor/random';
import sinon from 'sinon';

const StubCollections = (() => {
Expand Down
Loading