Commit Graph
55473 Commits
Author SHA1 Message Date
Sheetal Nandi 39bbfc9fe8 Merge pull request #31836 from AlCalzone/iobroker/fix-getForeignObjectsAsync-returntype
[iobroker] Fix return type of getForeignObjectsAsync
2019-01-02 12:09:21 -08:00
Sheetal Nandi 78e6a965fe Merge pull request #31820 from danduh/master
[pubnub] Added "history" method with required interfaces
2019-01-02 11:55:16 -08:00
Sheetal Nandi 6d49f3584c Merge pull request #31798 from epicfaace/patch-1
Mongoose types - Add Query.getOptions()
2019-01-02 11:55:01 -08:00
Sheetal Nandi ed26cdb960 Merge pull request #31825 from spacejack/mithril-closurecomponent
Mithril - Add ClosureComponent type alias
2019-01-02 11:54:20 -08:00
Sheetal Nandi 24cfbd380e Merge pull request #31842 from Retsam/computed-infer-issue
Knockout: Fix issue with computeds and KnockoutObservable<infer T> (reopened)
2019-01-02 11:53:53 -08:00
Sheetal Nandi 1fff96f4aa Merge pull request #31341 from kirbysayshi/ksh/pseudo-audio-param
Add types for pseudo-audio-param
2019-01-02 11:34:43 -08:00
Eloy Durán 3a0e83e815 Merge pull request #31841 from artola/master
Add QueryResponseCache to relay-runtime
2019-01-02 19:20:23 +01:00
Andrew Petersen addf196db4 [pseudo-audio-param] remove lint rules, fix optional fn signature 2019-01-02 13:08:16 -05:00
Retsam 82a243caea Fix issue with computeds and KnockoutObservable<infer T>
The fix for #26700 caused this issue, where a KnockoutComputed<T> inferred as KnockoutObservable<T | undefined> when using conditional type inference
2019-01-02 12:11:06 -05:00
Daniel Rosenwasser 72d8ba2ffc Update README.md 2019-01-02 09:03:35 -08:00
Daniel Rosenwasser 7569a353df Merge pull request #31711 from virzak/russian
Russian README
2019-01-02 09:03:07 -08:00
Martin Artola 8673a2187e Add QueryResponseCache 2019-01-02 17:26:31 +01:00
dominic.griesel 141cb7e6b3 Fix missing semicolon 2019-01-02 16:51:32 +01:00
dominic.griesel 0f03ece7f9 Fix return type of getForeignObjectsAsync 2019-01-02 12:47:42 +01:00
Anjun Wang ddb5f8dd22 [strange] add types (#31757)
* [strange] add types

* [strange] import as namespace

* [strange] remove unused lint rule
2019-01-01 19:46:19 -08:00
spacejack f516c9be01 Add ClosureComponent type 2019-01-01 18:04:14 -05:00
spacejack 570db36e68 Edits to pass new linting rules 2019-01-01 17:51:48 -05:00
TOGASHI Tomoki 00fa3fc061 [google.script.client-side] Add types (#31792)
* [google.script.client-side] Add types

* [google.script.client-side] Put version and enable header lint rule
2019-01-01 14:18:30 -08:00
Christian Kühl bf4288fc9c [noble-mac] Add types (#31786)
* adds type definitions for noble-mac

* [noble-mac]: fix linter issues and remove linter exceptions

* [noble-mac]: fix dt-header issue
2019-01-01 13:30:49 -08:00
Carlos 0fd7e1bc6f [react-native-modal-dropdown] Add definitions (#31735)
* react-native-modal-dropdown: initial definitions

* fix the project path and export class

* fix member-access
2019-01-01 10:41:21 -08:00
Daniel Ostrovsky 84c8a9d2d9 [pubnub] Added "history" method with following interfaces:
HistoryParameters, HistoryMessage, HistoryResponse, HistoryStatus
2019-01-01 11:51:19 +02:00
Daniel Rosenwasser 0d851ec699 Merge pull request #31810 from BendingBender/keyv__sqlite
[@keyv/sqlite] Add types
2018-12-31 14:43:38 -08:00
Sheetal Nandi 6b423d024f [sparse-bitfield] Add types (#31811) 2018-12-31 12:54:16 -08:00
Claudio Procida e338aaeaa4 Adds definition of ContentState.getEntityMap() (#31706) 2018-12-31 12:53:32 -08:00
Rene Haas 71211f88c4 OverlayScrollbars TypeScript definitions (#31784)
* OverlayScrollbars TypeScript definitions

* added missing tests and improved definitions
2018-12-31 12:52:49 -08:00
Dimitri Benin bc5ffa8aa7 [sparse-bitfield] Add types 2018-12-31 20:50:33 +01:00
Alex Jerabek d9068c9d4e Correcting RangeFill description (#31815) 2018-12-31 11:31:10 -08:00
Dimitri Benin a1a6a81974 [typpy] Add types (#31804) 2018-12-31 11:04:17 -08:00
Dimitri Benin 8492d9a89b [@keyv/redis] Add types (#31809) 2018-12-31 10:55:20 -08:00
Dimitri Benin 56f95b3526 [@keyv/postgres] Add types (#31808) 2018-12-31 10:53:51 -08:00
Dimitri Benin 6fd150e951 [@keyv/mongo] Add types (#31806) 2018-12-31 10:51:27 -08:00
TeamworkGuy2 ae36dd3474 [readable-stream] Add readable-stream@2.3.6 definition (#31805) 2018-12-31 10:50:31 -08:00
Dimitri Benin 44edbc65ed [boxen] Add types (#31812) 2018-12-31 10:48:38 -08:00
Oliver Joseph Ash a0f4fe7299 react-helmet: add link and meta prop types (#31802)
* Add missing semicolon

* Add link and meta prop types
2018-12-31 10:43:36 -08:00
Anton Astashov b081a5b7d0 [@types/koa]: Parameterize Context and Application. (#31704)
* [@types/koa]: Parameterize `Context` and `Application`.

Currently, `ctx.state` is `any`, and `ctx` itself allows any fields to
be inside `Context`. That's essentially 2 places where developers can
add their custom properties, and would be great to opt-in into more
typesafe approach than it's currently is.

What if we parameterize `Context` and `Application` with 2 types - one
will define `ctx.state`, and another - fields in `Context`? Then, if you
chain `use`, TypeScript will infer the types properly for your
middlewares. Like:

```typescript
interface NewContext {
  orgh: string;
}

interface FooState {
  foo: string;
}

interface BarState {
  bar: string;
}

async function fooMiddleware(
  ctx: Koa.Context<FooState>,
  next: () => Promise<void>
): Promise<void> {
  ctx.state.foo = "foo";
  await next();
}

async function barMiddleware(
  ctx: Koa.Context<BarState>,
  next: () => Promise<void>
): Promise<void> {
  ctx.state.bar = "bar";
  await next();
}

const app = new Koa<{}, {}>()
  .use(fooMiddleware)
  .use(barMiddleware)
  .use<{}, NewContext>(async (ctx, next) => {
    // Here ctx is inferred as Koa.Context<FooState & BarState, NewContext>
    ctx.orgh = "bazinga";
    await next();
  })
  .use(async (ctx, next) => {
    // Here ctx is inferred as Koa.Context<FooState & BarState, NewContext>
    await next();
  });
// `app` here is `Koa<FooState & BarState, NewContext>`

app.listen(3000);
```

So, if you define `const app = new Koa<{}, {}>()`, then you'll opt-in
into "typesafe" Koa Context. But if you do just `const app = new Koa()`,
you still will have `ctx.state: any`, like before. So, it should be
backwards-compatible.

But even in this case you can specify what the `ctx` is inside
the middlewares, like:

```typescript
const app2 = new Koa();
app2.use(fooMiddleware);
app2.use(async (ctx, next) => {
  // `ctx.state` here is inferred as `any`
  ctx.state.prop = "Some Prop";
  await next();
});
app2.use(async (ctx: Koa.Context<{}, NewContext>, next) => {
  ctx.orgh = "oh yeah";
  await next();
});
app2.use(async (ctx: Koa.Context<FooState>, next) => {
  ctx.state.foo = "Yay";
  await next();
});
```

What do you think?

* Rename new `Context` to `ParameterizedContext`

So that all the old hacks with declaration merging of Koa's `Context`
wouldn't break.

* Fix the build

* Use Context instead of ParameterizedContext when possible
2018-12-31 10:35:34 -08:00
David Gomes 6b9f1df1d2 Fix type of Redux Form event handlers. (#31607)
* Fix type of Redux Form event handlers.

* Rename `fieldName` to `name` to keep flow type definitions consistent with Redux Form naming.

Co-Authored-By: davidgomes <davidrafagomes@gmail.com>

* Adds the missing name parameter to the onFocus and onDragStart event handlers in redux-form.

https://redux-form.com/7.4.2/docs/api/field.md/#-code-onblur-event-newvalue-previousvalue-name-gt-void-code-optional-

https://redux-form.com/7.4.2/docs/api/field.md/#-code-ondragstart-event-name-gt-void-code-optional-

Co-Authored-By: davidgomes <davidrafagomes@gmail.com>

* Removes weird space I added accidentally.
2018-12-31 10:33:29 -08:00
Marco Lanaro 2d5bc81771 Add types for distributions (#31472)
* Add types for distributions

* Fix import
2018-12-31 10:29:48 -08:00
Robert Bullen 1683b160b9 yup: ObjectSchema.shape() should support type intersections (#31290)
* - change ObjectSchema<T>.shape() to ObjectSchema<T>.shape<U>()
- changed Schema.validate*() to accept any type
- made declaration of Ref more restrictive
- bumped definitions version

* Addressed PR feedback:
- refined `ObjectSchema.shape()` with `Shape<T, U>`
- added a few more test cases
2018-12-31 10:23:59 -08:00
Mihail Novikov 499c5aaf02 Add types for react-simple-maps (#31221)
* Add types for react-simple-maps

* [@types/react-simple-maps] Add test file
2018-12-31 10:22:13 -08:00
Dimitri Benin deb6f8ae48 [@keyv/sqlite] Add types 2018-12-31 19:18:20 +01:00
Youngrok Kim 8acdd28c1e [range-parser] replace const enum with plain enum (#30680)
* description

* --isolatedModules fix

* replace const enum with plain enum
2018-12-31 10:17:47 -08:00
Joshua Searles d8efd10d1a Update Autobahn Connection with properties isRetrying and session (#30526)
* Update Autobahn Connection with properties isRetrying and session

* Adjust dtheader, per review
2018-12-31 10:15:15 -08:00
Oscar Busk 9272fc1637 [d3-cloud] Support import syntax (#30479)
* Allow importing from `d3-cloud`

* Modify export to be CommonJS
2018-12-31 10:13:42 -08:00
Shai Reznik 6d9584582e [jasmine-given] add fail function to done function definition (#29933) 2018-12-31 10:06:27 -08:00
Erik Kristensen 703965fef5 [@types/restify] Fix Callback Typing on Restify Metrics Plugin (#29785)
* fix typing on restify metrics plugin

* should be a function with typed arguments

* adding some comments to get another build to move the PR along
2018-12-31 10:03:22 -08:00
Laurens Rietveld 3095a0a266 N3: Added typings for synchronous parsing (#29726)
* N3: Added typings for synchronous parsing

* Improved signature order of parse function
2018-12-31 10:00:12 -08:00
Stephan Troyer 022a46ef5a react-youtube: refactor interfaces (#31699)
* separate interfaces

* fix linting
2018-12-31 09:03:26 -08:00
dominikeinkemmer 442fcd1ffd add support for chained calls in typings (#31695) 2018-12-31 09:02:59 -08:00
Dimitri Benin e8cd4c9394 [nedb] Nedb class should extend EventEmitter (#31669) 2018-12-31 09:02:12 -08:00
Dimitri Benin 9e661f99a8 [keyv] Extend types (#31671) 2018-12-31 09:01:46 -08:00