Commit Graph
41588 Commits
Author SHA1 Message Date
V# e63a146766 getInstanceByDom return type should be Echarts 2018-02-07 20:38:03 +08:00
Zev Spitz 8dd4f5d21b Minor fixes 2018-02-07 14:34:12 +02:00
Jaume Sanchez 1863849c3a Fixed types for Mesh: Material is no longer an array of Materials 2018-02-07 11:52:59 +00:00
Alan Agius a418bdb31a style(webpack-dev-server): fix lint issues 2018-02-07 12:46:14 +01:00
Alan Agius 65993d5e6f feat: add missing addDevServerEntrypoints in API 2018-02-07 12:33:20 +01:00
Zev Spitz d7f34a126d tslint disables for no-const-enum; ActiveXObjectNameMap; removed EnumeratorConstructors 2018-02-07 13:10:30 +02:00
Mathias Lykkegaard Lorenzen f757040364 Update index.d.ts 2018-02-07 11:35:04 +01:00
Bas Luksenburg 7bf711da33 Use ES6 import 2018-02-07 10:40:03 +01:00
Simon Buchan 17e9857f8d [aws-lambda] Add Handler and Callback types for each trigger.
No tests added for the new types yet, I'll get on that tomorrow.

Motivation
---

The connection between the trigger event and the result types can be
confusing sometimes - for example `CloudFormationCustomResourceResponse`
is *not* returned from the lambda, but instead should be sent to the
*Request `ResponseUrl`. This PR tries to help by providing pre-baked
`Handler` types for each of the triggers (that have types already).

There's also a few niggles with naming and the handler signature that
have been bothering me for a while.

Changes
---

This PR:

- Adds defaulted generic parameters to the existing `Handler` and
  `Callback` types. This increases the minimum TS version to 2.3.

- Makes the `callback` parameter to `Handler`s "required" - this
  probably originally was meant to represent the Node 0.10 runtime,
  which did not pass a callback parameter, but that is no longer
  selectable when creating or editing a Lambda and makes the normal,
  recommended usage harder. In case anyone is confused, this doesn't
  break any code: it is required to be provided when being called, your
  handlers don't need to declare it. I'm not removing the legacy node 0.10
  runtime methods `context.done()` etc., since they still work.

- In the spirit of #21874, make the default result type for
  `Handler`, `Callback` `any`, since the only requirement is
  that it be `JSON.stringify()`able, and there are things like
  `.toJSON()`, etc. so there is no meaningful type restriction
  here.

- Revert the definition changes of #22588, which changed the `Handler`
  result types to `void | Promise<void>`, which is misleading: Lambda
  will not accept or wait for a promise result (it by default waits
  for the node event loop to empty). This is not a breaking change for
  code that does return promises, since a `void` result type is
  compatible with any result type, even with strict function types.
  (Which is why the tests still pass.)

- Adds `FooHandler` and `FooCallback` types for all `FooEvent`s and
  `FooResult`s, where possible - sometimes these don't match up.

- Renamed, with aliases to the old name, various types to align them: in
  particular `ProxyResult` -> `APIGatewayProxyResult`.

- `CloudFrontResult` (not the same type as `CloudFrontResponse`!)
  was missing for some reason.
2018-02-07 21:47:58 +13:00
Sriram Thiagarajan 9c4548f8ba add clearRenderer prop 2018-02-07 12:29:29 +05:30
Ryan Cannon 3c3b65a2f0 Merge branch 'master' into patch-2 2018-02-06 21:39:21 -08:00
Garth Kidd 499d248746 Stripe card numbers are strings:
The Stripe API for Node documentation of [Create a card token][cct]
gives the example code:

```
var stripe = require("stripe")(
  "sk_test_BQokikJOvBiI2HlWgH4olfQ2"
);

stripe.tokens.create({
  card: {
    "number": '4242424242424242',
    "exp_month": 12,
    "exp_year": 2019,
    "cvc": '123'
  }
}, function(err, token) {
  // asynchronously called
});
```

[cct]: https://stripe.com/docs/api/node#create_card_token

Relevant typings history:

* @borisyankov first added `StripeTokenData.number: number` in 2013-09

* @codeanimal substantially reworked the typings in 2016-04 with
`ISourceCreationOptions.number: string` but giving it the comment:

  > The card number, as a string without any separators.
2018-02-07 15:26:50 +11:00
s0m3on3 94a0f73c85 [adone] refactoring, additions
* [collections] decomposition, add MapCache, NSCache, RefcountedCache, Set
* [data] add protobuf, base32, basex, base58, base64url, varint, varintSigned
* [is] improve function and asyncFunction, add emitter and asyncEmitter
* add fake
2018-02-07 02:22:11 +02:00
Aluan Haddad bd3ddd8680 document removes_comments parameter based on source README 2018-02-06 15:55:04 -05:00
Aluan Haddad 5f458aeadb add tests for updated signature 2018-02-06 15:48:35 -05:00
Aluan Haddad c240fc8a43 match DefinitelyTyped JSDoc asterisk style 2018-02-06 15:48:18 -05:00
Aluan Haddad 14622de78f lint 2018-02-06 15:35:05 -05:00
Aluan Haddad eb70258db2 improve the type of the stringify function
Update the stringify function based on the declarations in `lib.es5.d.ts` for JSON.parse.

Add the documentation taken from `lib.es5.t.ts`
2018-02-06 15:26:32 -05:00
Huw McNamara 4fb702c02c changed local pick name 2018-02-06 20:03:20 +00:00
Huw McNamara e00c71172a fixed deps, add local pick def 2018-02-06 19:21:36 +00:00
Huw McNamara 673020868e made changes to v9 2018-02-06 18:55:42 +00:00
Huw McNamara 613c514505 actioned comments 2018-02-06 18:40:40 +00:00
Andy Hanson e54d6d1d1b Convert yet more import * to import = 2018-02-06 10:31:25 -08:00
Matthias Dailey 20a8429ad3 Add tests and fix a few definitions. 2018-02-06 12:44:59 -05:00
Li Zhe a4e0fb1add fix jsqrcode callback issue 2018-02-07 01:33:01 +08:00
Pete Johanson 4ac19f3b7b Switch to using ReadonlyArray for URITemplateValue. 2018-02-06 11:56:47 -05:00
Pete Johanson 8e3b4d3f3f Add myself to Definitions header of urijs. 2018-02-06 11:51:12 -05:00
Xavier Campenon 21fda8cd9c @types/googlemaps Add setClickableIcons
setClickableIcons method was missing in Map object
See https://developers.google.com/maps/documentation/javascript/reference
2018-02-06 17:47:58 +01:00
Denis Malinochkin a593fd2d60 refactor(node): Remove duplicate line for the «addListener» method (#23449) 2018-02-06 08:47:31 -08:00
Pete Johanson 1758d5cc16 Add explicit URITemplate type to urijs types.
* Strongly typed `expand` function on URITemplate that outlines
  possible values.
2018-02-06 11:46:52 -05:00
Andy 86ad142f21 Convert even more import * to import = (#23461) 2018-02-06 08:38:38 -08:00
Eloy Durán 71c9314e21 Merge pull request #23460 from alloy/relay-better-relay-provided-props-2
[Relay] Various improvements
2018-02-06 11:29:19 -05:00
Eloy Durán 4baa6ab4c6 [relay] Improve typing of componentRef and refactor slightly. 2018-02-06 17:25:16 +01:00
Eloy Durán eee0c90fa6 [relay] Fix lint issues. 2018-02-06 17:12:30 +01:00
Eloy Durán cda26c85c2 [relay] Expose componentRef prop of containers. 2018-02-06 15:59:17 +01:00
Eloy Durán 26b18f911e [relay] Make sure optional props remain optional. 2018-02-06 15:59:17 +01:00
Eloy Durán 4a5279010a [relay] ConcreteFragment should have been FragmentReference. 2018-02-06 15:59:16 +01:00
Eloy Durán e1dd20d21c [relay] Update tests for emitted TS artifacts. 2018-02-06 15:59:16 +01:00
Eloy Durán 14f4b6d24e [relay] Use const enum for unique fragment types. 2018-02-06 15:59:16 +01:00
Eloy Durán 0351b87eca [relay] Add types used in compiler artifacts and improve tests. 2018-02-06 15:59:16 +01:00
Eloy Durán 2fcce313b6 [react-relay] Remove relay prop from containers. 2018-02-06 15:59:16 +01:00
Eloy Durán c41956752f [relay] Cleanup of where types are defined and scope tests. 2018-02-06 15:59:16 +01:00
Eloy Durán be38f831c2 [relay] Use React.ComponentType. 2018-02-06 15:59:16 +01:00
Eloy Durán 83839f3122 [react-relay] Split tests into modern, compat, and classic files. 2018-02-06 15:59:15 +01:00
Danilo Bargen 176374804a RTCPeerConnection: Add signalingState property 2018-02-06 15:29:15 +01:00
Nico Hartto 6a699cadd8 Added tests for table plugin types 2018-02-06 16:25:37 +02:00
Nico Hartto 6c9170c6dd First iteration of types for tinymce table plugin 2018-02-06 16:19:12 +02:00
Nico Hartto d1a6daa644 Fixed typing for table_toolbar boolean => string.
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/23457
2018-02-06 16:13:42 +02:00
Bas Luksenburg 3c0ac3222d Use tabs instead of spaces to stay uniform 2018-02-06 13:54:40 +01:00
Bas Luksenburg ac85aa198c Added myself as author of changes to Definitions by 2018-02-06 13:47:35 +01:00