Commit Graph
68123 Commits
Author SHA1 Message Date
Benjamin Cooper bbb7c23de9 OpenPGP: Make TS 3.2 definitions be valid Typescript (#43500)
* Make Openpgp TS3.2 definitions be valid Typescript

* run prettier on openpgp types

* remove trailing comma
2020-03-31 09:37:18 -07:00
Tomasz Pluskiewicz 28ef98c43b fix(clownface): multiple context term may be defined (#43512) 2020-03-31 09:34:51 -07:00
Florian Keller ec71209dc5 [sodium-native] Add SecureBuffer attribute (#43514) 2020-03-31 09:34:02 -07:00
Michael Li 96f3e14ea2 Update input.d.ts (#43079) 2020-03-30 18:23:22 -07:00
Michaël De Boey 9af2953e04 [dot-object] update objecttype (#42845)
* [dot-object] update `object`type

* Update index.d.ts

* Update index.d.ts
2020-03-30 18:20:35 -07:00
Vincenzo Chianese 37dd9285e9 Postman Collection — responses is singular (#43231)
* Update index.d.ts

* Update postman-collection-tests.ts

* Update index.d.ts
2020-03-30 18:19:10 -07:00
Leandro Facchinetti f39f2c9319 Be more specific on the type of html (#43234) 2020-03-30 18:18:26 -07:00
Tümay Çeber 1b0e038153 async methods return a Promise if you omit the callback (#43249) 2020-03-30 18:17:55 -07:00
Andrey Trebler 649f32a864 parameter of createChannel method is optional (#43273) 2020-03-30 18:16:10 -07:00
Leandro Facchinetti bcd52d08ab @types/smtp-server Make optional the callback to close() (#43268)
Note how the implementation [checks](https://github.com/nodemailer/smtp-server/blob/427cb7a2382a74f79fea379fb23bf781625ea112/lib/smtp-server.js#L138) whether the callback was passed.
2020-03-30 18:15:42 -07:00
Leandro Facchinetti fab831b1d9 @types/mailparser Fix nullability of ParsedEmail fields (#43323)
| [Documentation](https://nodemailer.com/extras/mailparser/#mail-object) | Nullable for real | Current Types                          | Right? |
| ---------------------------------------------------------------------- | ----------------- | -------------------------------------- | ------ |
| `headers`                                                              | NO                | `headers: Headers`                     | YES    |
| `subject`                                                              | YES               | `subject: string`                      | NO     |
| `from`                                                                 | YES               | `from: AddressObject`                  | NO     |
| `to`                                                                   | YES               | `to: AddressObject`                    | NO     |
| `cc`                                                                   | YES               | `cc?: AddressObject`                   | YES    |
| `bcc`                                                                  | YES               | `bcc?: AddressObject`                  | YES    |
| `date`                                                                 | YES               | `date?: Date`                          | YES    |
| `messageId`                                                            | YES               | `messageId?: string`                   | YES    |
| `inReplyTo`                                                            | YES               | `inReplyTo?: string`                   | YES    |
| `reply-to`                                                             | YES               | `replyTo?: AddressObject`              | YES    |
| `references`                                                           | YES               | `references?: string[]`                | YES    |
| `html`                                                                 | NO                | `html: string | boolean`               | YES    |
| `text`                                                                 | YES               | `text: string`                         | NO     |
| `textAsHtml`                                                           | YES               | `textAsHtml: string`                   | NO     |
| `attachments`                                                          | NO                | `attachments?: Attachment[]`           | NO     |
|                                                                        | NO                | `headerLines: HeaderLines`             | YES    |
|                                                                        | YES               | `priority?: 'normal' | 'low' | 'high'` | YES    |

I used the following program to determine the nullability of fields:

```ts
import mailparser from "mailparser";

(async () => {
  const email = await mailparser.simpleParser("");
  console.log(JSON.stringify(email, null, 2));
  console.log("headers: ", JSON.stringify(email.headers, null, 2));
  console.log("subject: ", JSON.stringify(email.subject, null, 2));
  console.log("from: ", JSON.stringify(email.from, null, 2));
  console.log("to: ", JSON.stringify(email.to, null, 2));
  console.log("cc: ", JSON.stringify(email.cc, null, 2));
  console.log("bcc: ", JSON.stringify(email.bcc, null, 2));
  console.log("date: ", JSON.stringify(email.date, null, 2));
  console.log("messageId: ", JSON.stringify(email.messageId, null, 2));
  console.log("inReplyTo: ", JSON.stringify(email.inReplyTo, null, 2));
  console.log("reply-to: ", JSON.stringify(email.replyTo, null, 2));
  console.log("references: ", JSON.stringify(email.references, null, 2));
  console.log("html: ", JSON.stringify(email.html, null, 2));
  console.log("text: ", JSON.stringify(email.text, null, 2));
  console.log("textAsHtml: ", JSON.stringify(email.textAsHtml, null, 2));
  console.log("attachments: ", JSON.stringify(email.attachments, null, 2));

  console.log("headerLines: ", JSON.stringify(email.headerLines, null, 2));
  console.log("priority: ", JSON.stringify(email.priority, null, 2));
})();
```
2020-03-30 18:14:53 -07:00
Robert Wettstädt 25e6101351 [echarts] Change graph series links and categories from single objects to arrays of objects (#43381)
* [echarts] Change graph series links to array

* [echarts] Change graph series categories to array
2020-03-30 18:07:42 -07:00
Johannes Scheibe 5f733137d4 @types/react-map-gl: change schema to scheme in SourceProps (#43200)
* 🐛 change schema to scheme (typo)

* ✅ add test for SourceProp scheme

* ✅ add source and layer for raster tiles in test

* 🔥 remove scheme from geojson source

* 🐛 use correct source id in layer test
2020-03-30 17:44:56 -07:00
Liam Wilkins f7cb00f54f MouseEvent correctly inherits UIEvent properties (#38774)
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent at time of
writing shows that MouseEvent should share properties from UIEvent.
2020-03-30 17:44:03 -07:00
Jean-Raphaël Matte 4e2b7278ed [@types/pdfmake] Overhaul type definitions (cont. from #42787) (#42991)
* [@types/pdfmake] Split definitions

pdfmake/index.d.ts will only export the node api.
pdfmake/interfaces.d.ts will contain all data types
pdfmake/build/pdfmake.d.ts will export the browser module api as well as the global namespace object
pdfmake/build/vfs_fonts.d.ts will export the vfs for the browser

* [@types/pdfmake] Add type references for node and pdfkit

* [@types/pdfmake] Remove enums

TypeScript enums exist at runtime and should never be used in type declaration files unless they perfectly describe the behaviour of the JS code (which is highly unlikely). pdfMake only expects string literals, so the enums were modeled as unions of string literals.

* [@types/pdfmake] Overhaul interfaces

All changes were meticulously verified against the official docs, the examples AND the source code. Since the documentation is incomplete, the only real spec I had to work with was the actual implementation, which is less than ideal.

* [@types/pdfmake] Update server and browser api files

The server api exposes a class as single export object. This means the `export =` syntax is necessary for the type definitions, and the consumers must import the module with an `import PdfPrinter = require('pdfmake')` statement.
The browser api expose both a compliant ES6 module and a global 'pdfMake' object, which is why the 'export as namespace' syntax is necessary.

* [@types/pdfmake] Update tests

The examples provided by the pdfMake playground and repository are all copied in pdfmake-playground-examples-tests.ts and pdfmake-examples-test.ts respectively.
The pdfmake-interfaces-tests.ts contains code from the documentation as well as additionnal tests for coverage.
The other files test all different flavors of the api.

* [@types/pdfmake] Add myself as maintainer

* [@types/pdfmake] Layout long union type

* [@types/pdfmake] Add PageBreak union type

* [@types/pdfmake] Add doc comments

* [@types/pdfmake] Fix typo
2020-03-30 17:42:10 -07:00
Michael Mitchell ef958d9a91 Fix bent response (#43475)
* [bent] Add `dom` as a triple-slash reference

For some reason including dom in the lib doesn't appear to work, and tsc throws an error if the user doesn't include `dom` in their own project.

* [bent] Bump minimum TypeScript ver
2020-03-30 17:29:20 -07:00
Max LysenkoandMax Lysenko 1cc65a1bde Fixed lib.WordArray.random return type. (#43047)
Co-authored-by: Max Lysenko <maxim.lysenko94@gmail.com>
2020-03-30 17:17:23 -07:00
tonybadguy a434bcf6ed [@types/chart.js] Added missing axis field to hover options (#43253)
* update test

* added missing axis field

* pr update
2020-03-30 17:16:40 -07:00
Rasmus Eneman e37dc3fef0 [react] forwardRefs ref object should be mutable (#43265)
Please fill in this template.

- [x] Use a meaningful title for the pull request. Include the name of the package modified.
- [x] Test the change in your own code. (Compile and run.)
- [x] Add or edit tests to reflect the change. (Run with `npm test`.)
- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [x] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [x] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).

Select one of these and delete the others:

If changing an existing definition:
- [x] Provide a URL to documentation or source code which provides context for the suggested changes: #31065, #39062
- [x] If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
- [x] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`. If for reason the any rule need to be disabled, disable it for that line using `// tslint:disable-next-line [ruleName]` and not for whole package so that the need for disabling can be reviewed.

Fixes  #39062
2020-03-30 17:16:10 -07:00
Michael Hays df015ee40e Added missing fields to google.visualization TableOptions (#43365)
* Update index.d.ts

Adding missing settings to TableOptions

* Update index.d.ts
2020-03-30 17:14:20 -07:00
Tomáš Szabo e26aaaedb2 fix(eslint): missing static method/property on CLIEngine (#43345)
* fix(eslint): missing static method/property

- change `CLIEngine.version` to static property
- add `CLIEngine.getFormatter` static method

* fix(eslint): change let to const in tests

* refactor(eslint): revert formatting
2020-03-30 17:13:49 -07:00
Joe Flateau 5adeca0533 add video.js LiveTracker and tests (#43395)
* add videojs LiveTracker and tests

* make the linter happy

* fix type of pastSeekEnd
2020-03-30 17:12:51 -07:00
spring-raining a99369a016 [svgo] Fix type definition of PluginInlineStyles interface (#43411) 2020-03-30 17:10:28 -07:00
Jeroen Akkerman d08665f370 [express-mysql-session] Improve typings (#43436)
* [express-mysql-session] Improve typings

* [express-mysql-session] Revert unneeded changes

* [express-mysql-session] Update version header

* Revert "[express-mysql-session] Update version header"

This reverts commit a6a15b97f6496603370df36dfdcdffb5ad0a601f.

* [express-mysql-session] Use better name in all() callback
2020-03-30 16:51:36 -07:00
Michael Li ff1063a5ee Fix UseTableHooks types (#43444)
UseTableHooks#allColumns and UseTableHooks#visibleColumns should use type ColumnInstance instead of Column. see UseTableInstanceProps#allColumns.
2020-03-30 16:50:41 -07:00
Phil ColeandPhil Cole 52c902706e Webresources and Iframes have getContentWindow method (#43449)
Co-authored-by: Phil Cole <pcole@ebecs.com>
2020-03-30 16:49:08 -07:00
Kyle Chisholm 191c20e649 Replace method generic type to for request and response data (#43463) 2020-03-30 16:47:52 -07:00
Caleb Sander dc24764d2b Add inherited stream events to Read/WriteStream (#43474)
This will allow typechecking and autocompletion for events
inherited from stream.Readable and stream.Writable.

Also add missing 'ready' event and `pending` field from Node 9 and 11, respectively.
And missing 'pause' and 'resume' events on stream.Readable.
2020-03-30 16:47:16 -07:00
Evan Purkhiser 1ed6fe521f fix(moo): Add missing Lexer methods (#43477) 2020-03-30 15:54:10 -07:00
Martin 41315ef7af [chart.js] Add return type null to NestedTickOptions callback (#43143)
* [chart.js] Add return type null to NestedTickOptions callback

* [chart.js] Add undefined as callback return value
2020-03-30 15:53:18 -07:00
Jens Claes 7e081dcef7 [node] Add aborted to http.IncomingMessage (#43379)
* Add aborted to http.IncomingMessage

https://nodejs.org/api/http.html#http_message_aborted

* Update http.d.ts

* Update node v10
2020-03-30 15:49:35 -07:00
Philipp Katz d2402648e0 email-templates: add renderAll, make locals optional, send returns a Promise (#43479)
* email-templates: add `renderAll` function

https://github.com/niftylettuce/email-templates#render-html-andor-text
https://github.com/niftylettuce/email-templates/blob/af01d14fef9df70370f82761d7116ccb979edc2c/src/index.js#L186

* Make `locals` param optional

https://github.com/niftylettuce/email-templates/blob/af01d14fef9df70370f82761d7116ccb979edc2c/src/index.js#L135

* Add `EmailMessage`

https://github.com/niftylettuce/email-templates/blob/af01d14fef9df70370f82761d7116ccb979edc2c/src/index.js#L186

* Mention myself

* `send` returns a `Promise`
2020-03-30 15:48:38 -07:00
Linus Unnebäck b4c23f0e86 [mime-db] Add exported object (#43066)
* [mime-db] Add exported object

* Use module import style
2020-03-30 15:40:00 -07:00
Rory King 8779cbaf8b [@types/webpack] Add system libraryTarget (#43491) 2020-03-30 15:35:46 -07:00
Andre Fonseca 80f219d5ae [mapbox-gl] Add missing properties for layer types (#43385)
* extract paint property type to a named type

* add missing properties to some layer subtypes

* adds tests for every layout and paint option
2020-03-30 15:35:01 -07:00
Joep KockelkornandJoep Kockelkorn 910163516f Update jsoneditor types to 8.6.3 (#43476)
* chore: fix lint errors and add myself as writer

* feat(jsoneditor): update types partly

* feat(jsoneditor): finish up

* feat(jsoneditor-for-react): up version

* chore: consolidate versions for jesoneditor

* chore: add myself as contributor

Co-authored-by: Joep Kockelkorn <joep.kockelkorn@engie.com>
2020-03-30 15:24:50 -07:00
Igor Oleinikov 2ea0ccd01f [react-query] Update API to 1.10.0 (#43438)
* [react-query] Update API to 1.10.0
- breaking changes

* Make use of extra variables
* Fixing lint errors
* Complete useInfiniteQuery
* Add global config
* Add queryCache
* Allow keys and variables with infinite tails
* Add discriminated unions for base and paginated queries
* Discriminated union for mutation result
* Require first key element to be a string subtype
2020-03-30 15:23:50 -07:00
Simon Hanna 21c3e41669 Fix MakeDirectoryOptions for node 12 (#43352)
* Fix MakeDirectoryOptions for node 12

* Update MakeDirectoryOptions for node:13

* Update MakeDirectoryOptions for node:11
2020-03-30 15:21:13 -07:00
Piotr Błażejewicz (Peter Blazejewicz) d853828f50 feat(karma): update constants export details (#42992)
* feat(karma): update constants export details

- move Constatns to separate file
- export as named re-export from main module
- add missing type for 'PORT' - should be `number` OR `string` depending
on the source of this contant. If read from ENV it will be a string
always.
- add missing documentation
- move LOG types to use string literal types to use in the values in
typechecks and intelllisense
- tests updated

https://github.com/karma-runner/karma/blob/master/lib/constants.js

Thanks!

* Resolve pull request comments:

- constants import changed
- re-export redefined
- contants module reshape to comply with native module details.

Using namespace import and named import for constant required TSLint
config update to allow named imports:
see: palantir/tslint#4524

/cc @43081j

Thanks!

* Refine import details as per PR comment

/cc @43081j
2020-03-30 15:14:25 -07:00
Jack Bates 33e0ecb3c1 [daterangepicker] Enable noImplicitThis (#42903) 2020-03-30 15:12:03 -07:00
Piotr Błażejewicz (Peter Blazejewicz) 8d8f42c838 update(autoprefixer): add browsers and prefixes modules (#43462)
As already used in the stylelint project:
https://github.com/stylelint/stylelint/blob/master/types/autoprefixer/index.d.ts

- add `lib/browsers` and `lib/prefixes`
- update tests

https://github.com/postcss/autoprefixer/blob/master/lib/browsers.js
https://github.com/postcss/autoprefixer/blob/master/lib/prefixes.js

Thanks!
2020-03-30 15:11:21 -07:00
Tomasz Pluskiewicz 21b410c313 big refactoring of clownface (#43464)
* fix(clownface): correct the use of generics

* avoid common mistakes

* rafactor(clownface): remove duplicate interface declarations
2020-03-30 15:08:41 -07:00
Joey Rafidi 174534f0fc [cesium] add scene height sample methods and entity tileset graphics option (#43494)
* [cesium] add scene height sample methods and entity tileset graphics option

* Fix tests
2020-03-30 15:01:16 -07:00
Alex Jerabek ced96117ff [office-js, office-js-preview] Note about suspendScreenUpdatingUntilNextSync behavior (#43493)
* Removing prompt verbage from selection binding options

* Note about suspendScreenUpdatingUntilNextSync behavior
2020-03-30 12:17:48 -07:00
Simon Knott c03bbb7743 Remove myself from Maintainers list (#43490)
Since I don't work with RN anymore, maintaining this definitions is out of scope right now.
2020-03-30 17:31:16 +02:00
John DetlefsandJeroen Claassens a75f3d3a49 MUI-Datatables: Update to let text labels and download options to be partials. (#43183)
* Update to let text labels be optional.

* Make download options partial.

* Revert some of the autoformatting issues.

* Update types/mui-datatables/index.d.ts

Co-Authored-By: Jeroen Claassens <jeroen.claassens@live.nl>

Co-authored-by: Jeroen Claassens <jeroen.claassens@live.nl>
2020-03-30 08:58:39 -04:00
Dion Shi 7caeca4bfb Update webpack ProgressPlugin definition, to support both object/function options (#43375)
* Update webpack ProgressPlugin definition, to support both options of object and function.

* Re-order webpack.ProgressPlugin parameter ordering to trigger CI.

* Tune webpack ProgressPlugin definition for current v4 version, and also add comments.

* Fix webpack ProgressPlugin default value comment for current v4 version, and also update handler function interface according to official document.
2020-03-29 14:03:30 +01:00
Jack WorksandOrta Therox f385d82f5a feat: add slot element for jsx (#43237)
Co-authored-by: Orta Therox <orta.therox@gmail.com>
2020-03-28 11:52:59 -07:00
Kristiāns Salna fa37888d9b Additional sumo-logger definitions. (#43415) 2020-03-28 11:52:14 -07:00
Adam Montgomery 7d7387e5a3 correct isSupported type (#43419)
it’s not actually a function, it’s a boolean property
2020-03-28 11:51:29 -07:00