From 28ef3d201b4271f3bb6c417b01a98d5706dd62a5 Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Wed, 14 Sep 2016 12:12:01 -0700 Subject: [PATCH] Remove `` from definitions files and replace it with `import * as Xxx from "xxx"` or `` --- 3d-bin-packing/3d-bin-packing-tests.ts | 2 - 3d-bin-packing/3d-bin-packing.d.ts | 10 +- 3d-bin-packing/tsconfig.json | 19 + angular-q-spread/angular-q-spread-tests.ts | 2 - angular-q-spread/angular-q-spread.d.ts | 4 +- angular-q-spread/tsconfig.json | 19 + angular-websocket/angular-websocket.d.ts | 256 +++---- angular-websocket/tsconfig.json | 19 + angular-xeditable/angular-xeditable.d.ts | 162 ++-- angular-xeditable/tsconfig.json | 19 + .../backbone-fetch-cache-tests.ts | 5 +- .../backbone-fetch-cache.d.ts | 189 ----- backbone-fetch-cache/index.d.ts | 183 +++++ backbone-fetch-cache/tsconfig.json | 19 + backbone/index.d.ts | 2 +- backlog-js/backlog-js-tests.ts | 2 - backlog-js/backlog-js.d.ts | 695 ------------------ backlog-js/index.d.ts | 690 +++++++++++++++++ backlog-js/tsconfig.json | 19 + bootstrap-fileinput/bootstrap-fileinput.d.ts | 2 +- bootstrap-fileinput/tsconfig.json | 18 + browserify/index.d.ts | 4 +- chai-dom/chai-dom.d.ts | 10 +- chai-dom/tsconfig.json | 19 + chai-enzyme/chai-enzyme-tests.tsx | 6 +- chai-enzyme/chai-enzyme.d.ts | 8 +- chai-enzyme/tsconfig.json | 21 + commangular/commangular.d.ts | 144 ++-- commangular/tsconfig.json | 19 + connect-redis/connect-redis-tests.ts | 2 +- connect-redis/connect-redis.d.ts | 6 +- connect-redis/tsconfig.json | 19 + cordova-plugin-file-transfer/index.d.ts | 6 +- cordova-plugin-file-transfer/tsconfig.json | 10 +- csv-parse/csv-parse.d.ts | 48 +- csv-parse/tsconfig.json | 19 + d3kit/d3kit-tests.ts | 6 +- d3kit/d3kit.d.ts | 16 +- d3kit/tsconfig.json | 19 + daterangepicker/daterangepicker-tests.ts | 1 + daterangepicker/daterangepicker.d.ts | 12 +- daterangepicker/package.json | 5 + daterangepicker/tsconfig.json | 19 + df-visible/df-visible.d.ts | 2 +- df-visible/tsconfig.json | 19 + dva/dva-tests.tsx | 12 +- dva/dva.d.ts | 4 +- dva/tsconfig.json | 21 + electron/index.d.ts | 2 +- epub/epub.d.ts | 22 +- epub/tsconfig.json | 19 + eq.js/index.d.ts | 2 +- eq.js/tsconfig.json | 3 +- esprima-walk/esprima-walk-tests.ts | 6 +- esprima-walk/esprima-walk.d.ts | 40 - esprima-walk/index.d.ts | 34 + esprima-walk/tsconfig.json | 19 + exorcist/exorcist.d.ts | 2 +- exorcist/tsconfig.json | 19 + .../express-domain-middleware.d.ts | 2 +- express-domain-middleware/tsconfig.json | 19 + file-type/file-type-tests.ts | 2 - file-type/{file-type.d.ts => index.d.ts} | 18 +- file-type/tsconfig.json | 19 + fill-pdf/fill-pdf.d.ts | 2 +- fill-pdf/tsconfig.json | 19 + fluent-ffmpeg/fluent-ffmpeg.d.ts | 2 +- fluent-ffmpeg/tsconfig.json | 19 + fullpage.js/fullpage.js.d.ts | 100 +-- fullpage.js/tsconfig.json | 19 + geojson2osm/geojson2osm-tests.ts | 3 - geojson2osm/geojson2osm.d.ts | 15 - geojson2osm/index.d.ts | 13 + geojson2osm/tsconfig.json | 19 + .../globalize-compiler-tests.ts | 13 +- globalize-compiler/globalize-compiler.d.ts | 106 --- globalize-compiler/index.d.ts | 96 +++ globalize-compiler/tsconfig.json | 19 + .../gulp-angular-templatecache-tests.ts | 3 - .../gulp-angular-templatecache.d.ts | 2 +- gulp-angular-templatecache/tsconfig.json | 19 + gulp-help-doc/gulp-help-doc-tests.ts | 4 - gulp-help-doc/gulp-help-doc.d.ts | 4 +- gulp-help-doc/tsconfig.json | 19 + gulp-insert/gulp-insert-tests.ts | 3 - gulp-insert/gulp-insert.d.ts | 4 +- gulp-insert/tsconfig.json | 19 + gulp/index.d.ts | 1 + html-pdf/html-pdf-tests.ts | 3 - html-pdf/html-pdf.d.ts | 2 +- html-pdf/tsconfig.json | 19 + html-webpack-plugin/html-webpack-plugin.d.ts | 2 +- html-webpack-plugin/tsconfig.json | 19 + imagemapster/imagemapster-tests.ts | 3 - imagemapster/imagemapster.d.ts | 2 +- imagemapster/tsconfig.json | 19 + intl-tel-input/intl-tel-input-tests.ts | 3 - intl-tel-input/intl-tel-input.d.ts | 2 +- intl-tel-input/tsconfig.json | 19 + inversify-binding-decorators/index.d.ts | 47 ++ .../inversify-binding-decorators-tests.ts | 2 - .../inversify-binding-decorators.d.ts | 59 -- inversify-binding-decorators/tsconfig.json | 20 + inversify-devtools/inversify-devtools-test.ts | 2 - inversify-devtools/inversify-devtools.d.ts | 7 +- inversify-devtools/tsconfig.json | 20 + .../inversify-express-utils-tests.ts | 2 - .../inversify-express-utils.d.ts | 4 +- inversify-express-utils/tsconfig.json | 20 + inversify-inject-decorators/index.d.ts | 23 + .../inversify-inject-decorators-tests.ts | 3 - .../inversify-inject-decorators.d.ts | 31 - inversify-inject-decorators/tsconfig.json | 20 + inversify-logger-middleware/index.d.ts | 65 ++ .../inversify-logger-middleware-tests.ts | 3 +- .../inversify-logger-middleware.d.ts | 70 -- inversify-logger-middleware/tsconfig.json | 20 + inversify-restify-utils/index.d.ts | 52 ++ .../inversify-restify-utils-tests.ts | 2 - .../inversify-restify-utils.d.ts | 59 -- inversify-restify-utils/tsconfig.json | 20 + .../istanbul-middleware-tests.ts | 1 - istanbul-middleware/istanbul-middleware.d.ts | 2 +- istanbul-middleware/tsconfig.json | 19 + jquery-mousewheel/jquery-mousewheel-tests.ts | 4 +- jquery-mousewheel/jquery-mousewheel.d.ts | 2 +- jquery-mousewheel/tsconfig.json | 19 + .../jquery-truncate-html-tests.ts | 5 +- .../jquery-truncate-html.d.ts | 4 +- jquery-truncate-html/tsconfig.json | 19 + jquery/index.d.ts | 310 ++++---- jsoneditor/jsoneditor.d.ts | 2 +- jsoneditor/tsconfig.json | 19 + jsuite/jsuite.d.ts | 4 +- jsuite/tsconfig.json | 18 + karma-chai-sinon/karma-chai-sinon-tests.ts | 4 + karma-chai-sinon/karma-chai-sinon.d.ts | 14 +- karma-chai-sinon/tsconfig.json | 19 + koa-compress/koa-compress-tests.ts | 3 - koa-compress/koa-compress.d.ts | 6 +- koa-compress/tsconfig.json | 19 + koa-hbs/koa-hbs-tests.ts | 3 - koa-hbs/koa-hbs.d.ts | 4 +- koa-hbs/tsconfig.json | 19 + koa-json-error/index.d.ts | 31 + koa-json-error/koa-json-error-tests.ts | 4 - koa-json-error/koa-json-error.d.ts | 36 - koa-json-error/tsconfig.json | 19 + .../leaflet-geocoder-mapzen-tests.ts | 3 - .../leaflet-geocoder-mapzen.d.ts | 3 +- leaflet-geocoder-mapzen/tsconfig.json | 19 + libxslt/index.d.ts | 59 ++ libxslt/libxslt-tests.ts | 3 - libxslt/libxslt.d.ts | 61 -- libxslt/tsconfig.json | 19 + .../marker-animate-unobtrusive-amd-tests.ts | 3 - .../marker-animate-unobtrusive-tests.ts | 5 +- .../marker-animate-unobtrusive.d.ts | 2 +- marker-animate-unobtrusive/tsconfig.json | 20 + masonry-layout/masonry-layout.d.ts | 30 +- masonry-layout/tsconfig.json | 19 + mitm/mitm-tests.ts | 2 - mitm/mitm.d.ts | 10 +- mitm/tsconfig.json | 19 + mongoose-paginate/mongoose-paginate-tests.ts | 4 +- mongoose-paginate/mongoose-paginate.d.ts | 2 +- mongoose-paginate/tsconfig.json | 19 + multer-s3/multer-s3-tests.ts | 2 - multer-s3/multer-s3.d.ts | 4 +- multer-s3/tsconfig.json | 19 + multer/index.d.ts | 58 +- musicmetadata/musicmetadata-tests.ts | 3 - musicmetadata/musicmetadata.d.ts | 2 +- musicmetadata/tsconfig.json | 19 + nes/nes-tests.ts | 6 +- nes/nes.d.ts | 2 +- nes/tsconfig.json | 19 + ngmap/ngmap-tests.ts | 5 +- ngmap/ngmap.d.ts | 14 +- ngmap/tsconfig.json | 19 + ngreact/ngreact-tests.tsx | 6 +- ngreact/ngreact.d.ts | 6 +- ngreact/tsconfig.json | 21 + node-usb/node-usb-tests.ts | 2 - node-usb/node-usb.d.ts | 2 +- node-usb/tsconfig.json | 19 + .../nodemailer-ses-transport-tests.ts | 4 +- .../nodemailer-ses-transport.d.ts | 5 +- nodemailer-ses-transport/tsconfig.json | 19 + notify.js/notify.js.d.ts | 246 +++---- notify.js/notify.js.tests.ts | 5 +- notify.js/tsconfig.json | 19 + nw.js/nw.js-tests.ts | 1 - nw.js/nw.js.d.ts | 2 +- nw.js/tsconfig.json | 19 + o.js/o.js-tests.ts | 3 +- o.js/o.js.d.ts | 6 +- o.js/tsconfig.json | 19 + .../passport-local-mongoose-tests.ts | 6 +- .../passport-local-mongoose.d.ts | 4 +- passport-local-mongoose/tsconfig.json | 19 + pg-pool/pg-pool.d.ts | 2 +- pg-pool/tsconfig.json | 19 + pino/pino-tests.ts | 2 - pino/pino.d.ts | 2 +- pino/tsconfig.json | 19 + ...chdb-adapter-fruitdown.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-fruitdown-tests.ts | 3 - pouchdb-adapter-fruitdown/tsconfig.json | 19 + .../{pouchdb-adapter-http.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-http-tests.ts | 3 - pouchdb-adapter-http/tsconfig.json | 19 + .../{pouchdb-adapter-idb.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-idb-tests.ts | 3 - pouchdb-adapter-idb/tsconfig.json | 19 + ...ouchdb-adapter-leveldb.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-leveldb-tests.ts | 3 - pouchdb-adapter-leveldb/tsconfig.json | 19 + ...b-adapter-localstorage.d.ts => index.d.ts} | 4 +- .../pouchdb-adapter-localstorage-tests.ts | 3 - pouchdb-adapter-localstorage/tsconfig.json | 19 + ...pouchdb-adapter-memory.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-memory-tests.ts | 3 - pouchdb-adapter-memory/tsconfig.json | 19 + ...db-adapter-node-websql.d.ts => index.d.ts} | 4 +- .../pouchdb-adapter-node-websql-tests.ts | 3 - pouchdb-adapter-node-websql/tsconfig.json | 19 + ...pouchdb-adapter-websql.d.ts => index.d.ts} | 2 +- .../pouchdb-adapter-websql-tests.ts | 3 - pouchdb-adapter-websql/tsconfig.json | 19 + .../{pouchdb-browser.d.ts => index.d.ts} | 10 +- pouchdb-browser/pouchdb-browser-tests.ts | 3 - pouchdb-browser/tsconfig.json | 19 + .../{pouchdb-core.d.ts => index.d.ts} | 0 pouchdb-core/pouchdb-core-tests.ts | 2 - pouchdb-core/tsconfig.json | 19 + .../{pouchdb-http.d.ts => index.d.ts} | 4 +- pouchdb-http/pouchdb-http-tests.ts | 3 - pouchdb-http/tsconfig.json | 19 + .../{pouchdb-mapreduce.d.ts => index.d.ts} | 2 +- pouchdb-mapreduce/pouchdb-mapreduce-tests.ts | 2 - pouchdb-mapreduce/tsconfig.json | 19 + .../{pouchdb-node.d.ts => index.d.ts} | 10 +- pouchdb-node/pouchdb-node-tests.ts | 3 - pouchdb-node/tsconfig.json | 19 + .../{pouchdb-replication.d.ts => index.d.ts} | 2 +- .../pouchdb-replication-tests.ts | 1 - pouchdb-replication/tsconfig.json | 19 + pouchdb-upsert/pouchdb-upsert.d.ts | 2 +- pouchdb-upsert/tsconfig.json | 19 + pouchdb/index.d.ts | 28 +- rc-tooltip/rc-tooltip-tests.tsx | 3 - rc-tooltip/rc-tooltip.d.ts | 6 +- rc-tooltip/tsconfig.json | 21 + react-autosuggest/react-autosuggest-tests.tsx | 24 +- react-autosuggest/react-autosuggest.d.ts | 10 +- react-autosuggest/tsconfig.json | 21 + .../react-big-calendar-tests.tsx | 7 +- react-big-calendar/react-big-calendar.d.ts | 2 - react-big-calendar/tsconfig.json | 21 + react-breadcrumbs/react-breadcrumbs-tests.tsx | 6 +- react-breadcrumbs/react-breadcrumbs.d.ts | 9 +- react-breadcrumbs/tsconfig.json | 21 + .../react-calendar-timeline-tests.tsx | 9 +- .../react-calendar-timeline.d.ts | 8 +- react-calendar-timeline/tsconfig.json | 21 + react-codemirror/react-codemirror-tests.tsx | 5 +- react-codemirror/react-codemirror.d.ts | 10 +- react-codemirror/tsconfig.json | 21 + .../{react-data-grid.d.ts => index.d.ts} | 11 +- react-data-grid/react-data-grid-tests.tsx | 8 +- react-data-grid/tsconfig.json | 20 + react-datepicker/package.json | 5 + react-datepicker/react-datepicker-tests.tsx | 18 +- react-datepicker/react-datepicker.d.ts | 4 +- react-datepicker/tsconfig.json | 21 + react-daterange-picker/index.d.ts | 65 ++ react-daterange-picker/package.json | 5 + .../react-daterange-picker-tests.tsx | 9 +- .../react-daterange-picker.d.ts | 77 -- react-daterange-picker/tsconfig.json | 21 + .../react-dnd-html5-backend.d.ts | 6 +- react-dnd-html5-backend/tsconfig.json | 19 + react-file-input/react-file-input-tests.tsx | 5 +- react-file-input/react-file-input.d.ts | 6 +- react-file-input/tsconfig.json | 21 + .../react-file-reader-input-tests.tsx | 5 +- .../react-file-reader-input.d.ts | 6 +- react-file-reader-input/tsconfig.json | 21 + react-flexr/react-flexr-tests.tsx | 3 +- react-flexr/react-flexr.d.ts | 4 +- react-flexr/tsconfig.json | 21 + react-fontawesome/react-fontawesome-tests.tsx | 4 - react-fontawesome/react-fontawesome.d.ts | 2 - react-fontawesome/tsconfig.json | 21 + react-i18next/index.d.ts | 57 ++ react-i18next/react-i18next-tests.tsx | 6 - react-i18next/react-i18next.d.ts | 65 -- react-i18next/tsconfig.json | 22 + react-imageloader/react-imageloader-tests.tsx | 3 - react-imageloader/react-imageloader.d.ts | 12 +- react-imageloader/tsconfig.json | 21 + .../react-is-deprecated-tests.ts | 3 - react-is-deprecated/react-is-deprecated.d.ts | 2 - react-is-deprecated/tsconfig.json | 21 + .../react-jsonschema-form-tests.tsx | 3 - .../react-jsonschema-form.d.ts | 2 - react-jsonschema-form/tsconfig.json | 21 + react-measure/react-measure-tests.tsx | 3 - react-measure/react-measure.d.ts | 2 - react-measure/tsconfig.json | 21 + react-modal/react-modal-tests.tsx | 3 - react-modal/react-modal.d.ts | 4 +- react-modal/tsconfig.json | 20 + .../react-motion-slider-tests.tsx | 3 - react-motion-slider/react-motion-slider.d.ts | 4 - react-motion-slider/tsconfig.json | 21 + react-relay/react-relay-test.tsx | 3 - react-relay/react-relay.d.ts | 2 - react-relay/tsconfig.json | 21 + react-responsive/react-responsive-tests.tsx | 3 - react-responsive/react-responsive.d.ts | 2 - react-responsive/tsconfig.json | 21 + react-router-redux/index.d.ts | 4 +- react-router/index.d.ts | 3 +- react-router/lib/Router.d.ts | 2 +- react-scrollbar/react-scrollbar-tests.tsx | 3 - react-scrollbar/react-scrollbar.d.ts | 6 +- react-scrollbar/tsconfig.json | 20 + react-slick/react-slick-test.tsx | 4 - react-slick/react-slick.d.ts | 4 +- react-slick/tsconfig.json | 20 + .../react-sortable-hoc-tests.tsx | 3 - react-sortable-hoc/react-sortable-hoc.d.ts | 4 +- react-sortable-hoc/tsconfig.json | 20 + react-split-pane/react-split-pane-tests.tsx | 3 - react-split-pane/react-split-pane.d.ts | 4 +- react-split-pane/tsconfig.json | 20 + react-swipeable/react-swipeable-tests.tsx | 3 - react-swipeable/react-swipeable.d.ts | 13 +- react-swipeable/tsconfig.json | 21 + .../react-textarea-autosize-tests.tsx | 3 - .../react-textarea-autosize.d.ts | 5 +- react-textarea-autosize/tsconfig.json | 21 + react-user-tour/react-user-tour-tests.tsx | 6 +- .../react-user-tour-tests.tsx.tscparams | 1 - react-user-tour/react-user-tour.d.ts | 8 +- react-user-tour/tsconfig.json | 21 + redux-bootstrap/redux-bootstrap-tests.tsx | 2 - redux-bootstrap/redux-bootstrap.d.ts | 6 +- redux-bootstrap/tsconfig.json | 21 + redux-mock-store/redux-mock-store-tests.ts | 3 +- redux-mock-store/redux-mock-store.d.ts | 2 +- redux-mock-store/tsconfig.json | 19 + .../redux-optimistic-ui-tests.ts | 3 - redux-optimistic-ui/redux-optimistic-ui.d.ts | 2 +- redux-optimistic-ui/tsconfig.json | 19 + .../redux-promise-middleware-tests.ts | 5 +- .../redux-promise-middleware.d.ts | 2 +- redux-promise-middleware/tsconfig.json | 19 + redux-storage/redux-storage-tests.ts | 3 - redux-storage/redux-storage.d.ts | 2 +- redux-storage/tsconfig.json | 19 + redux-ui/redux-ui-tests.ts | 4 +- redux-ui/redux-ui.d.ts | 2 - redux-ui/tsconfig.json | 21 + restler/restler.d.ts | 2 +- restler/tsconfig.json | 19 + rx-node/rx-node-tests.ts | 3 - rx-node/rx-node.d.ts | 4 +- rx-node/tsconfig.json | 19 + rx.wamp/{rx-wamp.d.ts => index.d.ts} | 15 +- .../{rx-wamp-tests.ts => rx.wamp-tests.ts} | 7 +- rx.wamp/tsconfig.json | 19 + rx/rx.aggregates.d.ts | 2 +- rx/rx.all.d.ts | 18 +- rx/rx.async.d.ts | 2 +- rx/rx.binding.d.ts | 2 +- rx/rx.coincidence.d.ts | 2 +- rx/rx.experimental.d.ts | 2 +- rx/rx.joinpatterns.d.ts | 2 +- rx/rx.testing.d.ts | 2 +- rx/rx.time.d.ts | 2 +- rx/rx.virtualtime.d.ts | 2 +- .../samchon-collection-tests.ts | 2 - samchon-collection/samchon-collection.d.ts | 2 +- samchon-collection/tsconfig.json | 19 + .../{samchon-framework.d.ts => index.d.ts} | 6 +- samchon-framework/samchon-framework-tests.ts | 2 - samchon-framework/tsconfig.json | 19 + samchon-library/samchon-library-tests.ts | 2 - samchon-library/samchon-library.d.ts | 2 +- samchon-library/tsconfig.json | 19 + samlp/samlp-tests.ts | 4 - samlp/samlp.d.ts | 4 +- samlp/tsconfig.json | 19 + set-cookie-parser/set-cookie-parser-tests.ts | 3 - set-cookie-parser/set-cookie-parser.d.ts | 2 +- set-cookie-parser/tsconfig.json | 19 + sinon-as-promised/sinon-as-promised-tests.ts | 7 +- sinon-as-promised/sinon-as-promised.d.ts | 11 +- sinon-as-promised/tsconfig.json | 19 + sinon/index.d.ts | 1 + socket.io-parser/socket.io-parser-tests.ts | 3 - socket.io-parser/socket.io-parser.d.ts | 2 +- socket.io-parser/tsconfig.json | 19 + spectacle/spectacle-tests.tsx | 3 - spectacle/spectacle.d.ts | 3 +- spectacle/tsconfig.json | 21 + split2/split2-tests.ts | 2 - split2/split2.d.ts | 2 +- split2/tsconfig.json | 19 + sqs-consumer/sqs-consumer-tests.ts | 8 +- sqs-consumer/sqs-consumer.d.ts | 16 +- sqs-consumer/tsconfig.json | 19 + sqs-producer/sqs-producer-tests.ts | 3 - sqs-producer/sqs-producer.d.ts | 2 +- sqs-producer/tsconfig.json | 19 + ssh2-sftp-client/ssh2-sftp-client-tests.ts | 2 - ssh2-sftp-client/ssh2-sftp-client.d.ts | 2 +- ssh2-sftp-client/tsconfig.json | 19 + suitescript/{suitescript.d.ts => index.d.ts} | 0 .../swagger-express-middleware-tests.ts | 6 +- .../swagger-express-middleware.d.ts | 78 +- swagger-express-middleware/tsconfig.json | 19 + tinder/tinder-tests.ts | 8 +- tinder/tinder.d.ts | 26 +- tinder/tsconfig.json | 19 + torrent-stream/torrent-stream-tests.ts | 2 - torrent-stream/torrent-stream.d.ts | 6 +- torrent-stream/tsconfig.json | 19 + twilio/index.d.ts | 14 +- twit/tsconfig.json | 19 + twit/twit-tests.ts | 2 - twit/twit.d.ts | 4 +- .../{typescript-stl.d.ts => index.d.ts} | 0 v8-profiler/tsconfig.json | 19 + v8-profiler/v8-profiler.d.ts | 2 +- victory/tsconfig.json | 21 + victory/victory-tests.tsx | 3 - victory/victory.d.ts | 11 +- watchify/index.d.ts | 48 ++ watchify/tsconfig.json | 19 + watchify/watchify-tests.ts | 2 - watchify/watchify.d.ts | 51 -- webpack-dev-server/tsconfig.json | 19 + .../webpack-dev-server-tests.ts | 5 +- webpack-dev-server/webpack-dev-server.d.ts | 4 - webpack-fail-plugin/tsconfig.json | 19 + .../webpack-fail-plugin-tests.ts | 1 - webpack-fail-plugin/webpack-fail-plugin.d.ts | 2 +- webpack-merge/tsconfig.json | 19 + webpack-merge/webpack-merge-tests.ts | 2 - webpack-merge/webpack-merge.d.ts | 2 +- webpack-stream/tsconfig.json | 19 + webpack-stream/webpack-stream-tests.ts | 3 - webpack-stream/webpack-stream.d.ts | 4 +- webpack-validator/tsconfig.json | 19 + webpack-validator/webpack-validator-tests.ts | 2 - webpack-validator/webpack-validator.d.ts | 2 +- whatwg-fetch/index.d.ts | 2 +- whatwg-fetch/whatwg-fetch-tests.ts | 6 +- .../{whatwg-streams.d.ts => index.d.ts} | 0 whatwg-streams/tsconfig.json | 19 + whatwg-streams/whatwg-streams-tests.ts | 6 +- why-did-you-update/tsconfig.json | 19 + .../why-did-you-update-tests.ts | 3 - why-did-you-update/why-did-you-update.d.ts | 4 +- winston-dynamodb/tsconfig.json | 19 + winston-dynamodb/winston-dynamodb-tests.ts | 3 - winston-dynamodb/winston-dynamodb.d.ts | 2 +- xmlpoke/tsconfig.json | 19 + xmlpoke/xmlpoke-tests.ts | 7 +- xmlpoke/xmlpoke.d.ts | 2 +- 474 files changed, 5552 insertions(+), 3078 deletions(-) create mode 100644 3d-bin-packing/tsconfig.json create mode 100644 angular-q-spread/tsconfig.json create mode 100644 angular-websocket/tsconfig.json create mode 100644 angular-xeditable/tsconfig.json delete mode 100644 backbone-fetch-cache/backbone-fetch-cache.d.ts create mode 100644 backbone-fetch-cache/index.d.ts create mode 100644 backbone-fetch-cache/tsconfig.json delete mode 100644 backlog-js/backlog-js.d.ts create mode 100644 backlog-js/index.d.ts create mode 100644 backlog-js/tsconfig.json create mode 100644 bootstrap-fileinput/tsconfig.json create mode 100644 chai-dom/tsconfig.json create mode 100644 chai-enzyme/tsconfig.json create mode 100644 commangular/tsconfig.json create mode 100644 connect-redis/tsconfig.json create mode 100644 csv-parse/tsconfig.json create mode 100644 d3kit/tsconfig.json create mode 100644 daterangepicker/package.json create mode 100644 daterangepicker/tsconfig.json create mode 100644 df-visible/tsconfig.json create mode 100644 dva/tsconfig.json create mode 100644 epub/tsconfig.json delete mode 100644 esprima-walk/esprima-walk.d.ts create mode 100644 esprima-walk/index.d.ts create mode 100644 esprima-walk/tsconfig.json create mode 100644 exorcist/tsconfig.json create mode 100644 express-domain-middleware/tsconfig.json rename file-type/{file-type.d.ts => index.d.ts} (51%) create mode 100644 file-type/tsconfig.json create mode 100644 fill-pdf/tsconfig.json create mode 100644 fluent-ffmpeg/tsconfig.json create mode 100644 fullpage.js/tsconfig.json delete mode 100644 geojson2osm/geojson2osm.d.ts create mode 100644 geojson2osm/index.d.ts create mode 100644 geojson2osm/tsconfig.json delete mode 100644 globalize-compiler/globalize-compiler.d.ts create mode 100644 globalize-compiler/index.d.ts create mode 100644 globalize-compiler/tsconfig.json create mode 100644 gulp-angular-templatecache/tsconfig.json create mode 100644 gulp-help-doc/tsconfig.json create mode 100644 gulp-insert/tsconfig.json create mode 100644 html-pdf/tsconfig.json create mode 100644 html-webpack-plugin/tsconfig.json create mode 100644 imagemapster/tsconfig.json create mode 100644 intl-tel-input/tsconfig.json create mode 100644 inversify-binding-decorators/index.d.ts delete mode 100644 inversify-binding-decorators/inversify-binding-decorators.d.ts create mode 100644 inversify-binding-decorators/tsconfig.json create mode 100644 inversify-devtools/tsconfig.json create mode 100644 inversify-express-utils/tsconfig.json create mode 100644 inversify-inject-decorators/index.d.ts delete mode 100644 inversify-inject-decorators/inversify-inject-decorators.d.ts create mode 100644 inversify-inject-decorators/tsconfig.json create mode 100644 inversify-logger-middleware/index.d.ts delete mode 100644 inversify-logger-middleware/inversify-logger-middleware.d.ts create mode 100644 inversify-logger-middleware/tsconfig.json create mode 100644 inversify-restify-utils/index.d.ts delete mode 100644 inversify-restify-utils/inversify-restify-utils.d.ts create mode 100644 inversify-restify-utils/tsconfig.json create mode 100644 istanbul-middleware/tsconfig.json create mode 100644 jquery-mousewheel/tsconfig.json create mode 100644 jquery-truncate-html/tsconfig.json create mode 100644 jsoneditor/tsconfig.json create mode 100644 jsuite/tsconfig.json create mode 100644 karma-chai-sinon/karma-chai-sinon-tests.ts create mode 100644 karma-chai-sinon/tsconfig.json create mode 100644 koa-compress/tsconfig.json create mode 100644 koa-hbs/tsconfig.json create mode 100644 koa-json-error/index.d.ts delete mode 100644 koa-json-error/koa-json-error.d.ts create mode 100644 koa-json-error/tsconfig.json create mode 100644 leaflet-geocoder-mapzen/tsconfig.json create mode 100644 libxslt/index.d.ts delete mode 100644 libxslt/libxslt.d.ts create mode 100644 libxslt/tsconfig.json create mode 100644 marker-animate-unobtrusive/tsconfig.json create mode 100644 masonry-layout/tsconfig.json create mode 100644 mitm/tsconfig.json create mode 100644 mongoose-paginate/tsconfig.json create mode 100644 multer-s3/tsconfig.json create mode 100644 musicmetadata/tsconfig.json create mode 100644 nes/tsconfig.json create mode 100644 ngmap/tsconfig.json create mode 100644 ngreact/tsconfig.json create mode 100644 node-usb/tsconfig.json create mode 100644 nodemailer-ses-transport/tsconfig.json create mode 100644 notify.js/tsconfig.json create mode 100644 nw.js/tsconfig.json create mode 100644 o.js/tsconfig.json create mode 100644 passport-local-mongoose/tsconfig.json create mode 100644 pg-pool/tsconfig.json create mode 100644 pino/tsconfig.json rename pouchdb-adapter-fruitdown/{pouchdb-adapter-fruitdown.d.ts => index.d.ts} (93%) create mode 100644 pouchdb-adapter-fruitdown/tsconfig.json rename pouchdb-adapter-http/{pouchdb-adapter-http.d.ts => index.d.ts} (93%) create mode 100644 pouchdb-adapter-http/tsconfig.json rename pouchdb-adapter-idb/{pouchdb-adapter-idb.d.ts => index.d.ts} (94%) create mode 100644 pouchdb-adapter-idb/tsconfig.json rename pouchdb-adapter-leveldb/{pouchdb-adapter-leveldb.d.ts => index.d.ts} (93%) create mode 100644 pouchdb-adapter-leveldb/tsconfig.json rename pouchdb-adapter-localstorage/{pouchdb-adapter-localstorage.d.ts => index.d.ts} (87%) create mode 100644 pouchdb-adapter-localstorage/tsconfig.json rename pouchdb-adapter-memory/{pouchdb-adapter-memory.d.ts => index.d.ts} (93%) create mode 100644 pouchdb-adapter-memory/tsconfig.json rename pouchdb-adapter-node-websql/{pouchdb-adapter-node-websql.d.ts => index.d.ts} (75%) create mode 100644 pouchdb-adapter-node-websql/tsconfig.json rename pouchdb-adapter-websql/{pouchdb-adapter-websql.d.ts => index.d.ts} (94%) create mode 100644 pouchdb-adapter-websql/tsconfig.json rename pouchdb-browser/{pouchdb-browser.d.ts => index.d.ts} (53%) create mode 100644 pouchdb-browser/tsconfig.json rename pouchdb-core/{pouchdb-core.d.ts => index.d.ts} (100%) create mode 100644 pouchdb-core/tsconfig.json rename pouchdb-http/{pouchdb-http.d.ts => index.d.ts} (74%) create mode 100644 pouchdb-http/tsconfig.json rename pouchdb-mapreduce/{pouchdb-mapreduce.d.ts => index.d.ts} (94%) create mode 100644 pouchdb-mapreduce/tsconfig.json rename pouchdb-node/{pouchdb-node.d.ts => index.d.ts} (63%) create mode 100644 pouchdb-node/tsconfig.json rename pouchdb-replication/{pouchdb-replication.d.ts => index.d.ts} (92%) create mode 100644 pouchdb-replication/tsconfig.json create mode 100644 pouchdb-upsert/tsconfig.json create mode 100644 rc-tooltip/tsconfig.json create mode 100644 react-autosuggest/tsconfig.json create mode 100644 react-big-calendar/tsconfig.json create mode 100644 react-breadcrumbs/tsconfig.json create mode 100644 react-calendar-timeline/tsconfig.json create mode 100644 react-codemirror/tsconfig.json rename react-data-grid/{react-data-grid.d.ts => index.d.ts} (98%) create mode 100644 react-data-grid/tsconfig.json create mode 100644 react-datepicker/package.json create mode 100644 react-datepicker/tsconfig.json create mode 100644 react-daterange-picker/index.d.ts create mode 100644 react-daterange-picker/package.json delete mode 100644 react-daterange-picker/react-daterange-picker.d.ts create mode 100644 react-daterange-picker/tsconfig.json create mode 100644 react-dnd-html5-backend/tsconfig.json create mode 100644 react-file-input/tsconfig.json create mode 100644 react-file-reader-input/tsconfig.json create mode 100644 react-flexr/tsconfig.json create mode 100644 react-fontawesome/tsconfig.json create mode 100644 react-i18next/index.d.ts delete mode 100644 react-i18next/react-i18next.d.ts create mode 100644 react-i18next/tsconfig.json create mode 100644 react-imageloader/tsconfig.json create mode 100644 react-is-deprecated/tsconfig.json create mode 100644 react-jsonschema-form/tsconfig.json create mode 100644 react-measure/tsconfig.json create mode 100644 react-modal/tsconfig.json create mode 100644 react-motion-slider/tsconfig.json create mode 100644 react-relay/tsconfig.json create mode 100644 react-responsive/tsconfig.json create mode 100644 react-scrollbar/tsconfig.json create mode 100644 react-slick/tsconfig.json create mode 100644 react-sortable-hoc/tsconfig.json create mode 100644 react-split-pane/tsconfig.json create mode 100644 react-swipeable/tsconfig.json create mode 100644 react-textarea-autosize/tsconfig.json delete mode 100644 react-user-tour/react-user-tour-tests.tsx.tscparams create mode 100644 react-user-tour/tsconfig.json create mode 100644 redux-bootstrap/tsconfig.json create mode 100644 redux-mock-store/tsconfig.json create mode 100644 redux-optimistic-ui/tsconfig.json create mode 100644 redux-promise-middleware/tsconfig.json create mode 100644 redux-storage/tsconfig.json create mode 100644 redux-ui/tsconfig.json create mode 100644 restler/tsconfig.json create mode 100644 rx-node/tsconfig.json rename rx.wamp/{rx-wamp.d.ts => index.d.ts} (89%) rename rx.wamp/{rx-wamp-tests.ts => rx.wamp-tests.ts} (97%) create mode 100644 rx.wamp/tsconfig.json create mode 100644 samchon-collection/tsconfig.json rename samchon-framework/{samchon-framework.d.ts => index.d.ts} (99%) create mode 100644 samchon-framework/tsconfig.json create mode 100644 samchon-library/tsconfig.json create mode 100644 samlp/tsconfig.json create mode 100644 set-cookie-parser/tsconfig.json create mode 100644 sinon-as-promised/tsconfig.json create mode 100644 socket.io-parser/tsconfig.json create mode 100644 spectacle/tsconfig.json create mode 100644 split2/tsconfig.json create mode 100644 sqs-consumer/tsconfig.json create mode 100644 sqs-producer/tsconfig.json create mode 100644 ssh2-sftp-client/tsconfig.json rename suitescript/{suitescript.d.ts => index.d.ts} (100%) create mode 100644 swagger-express-middleware/tsconfig.json create mode 100644 tinder/tsconfig.json create mode 100644 torrent-stream/tsconfig.json create mode 100644 twit/tsconfig.json rename typescript-stl/{typescript-stl.d.ts => index.d.ts} (100%) create mode 100644 v8-profiler/tsconfig.json create mode 100644 victory/tsconfig.json create mode 100644 watchify/index.d.ts create mode 100644 watchify/tsconfig.json delete mode 100644 watchify/watchify.d.ts create mode 100644 webpack-dev-server/tsconfig.json create mode 100644 webpack-fail-plugin/tsconfig.json create mode 100644 webpack-merge/tsconfig.json create mode 100644 webpack-stream/tsconfig.json create mode 100644 webpack-validator/tsconfig.json rename whatwg-streams/{whatwg-streams.d.ts => index.d.ts} (100%) create mode 100644 whatwg-streams/tsconfig.json create mode 100644 why-did-you-update/tsconfig.json create mode 100644 winston-dynamodb/tsconfig.json create mode 100644 xmlpoke/tsconfig.json diff --git a/3d-bin-packing/3d-bin-packing-tests.ts b/3d-bin-packing/3d-bin-packing-tests.ts index 4562c26ce9..319624d597 100644 --- a/3d-bin-packing/3d-bin-packing-tests.ts +++ b/3d-bin-packing/3d-bin-packing-tests.ts @@ -1,5 +1,3 @@ -/// - import packer = require("3d-bin-packing"); import samchon = require("samchon-framework"); diff --git a/3d-bin-packing/3d-bin-packing.d.ts b/3d-bin-packing/3d-bin-packing.d.ts index afd3af6050..2461538194 100644 --- a/3d-bin-packing/3d-bin-packing.d.ts +++ b/3d-bin-packing/3d-bin-packing.d.ts @@ -3,11 +3,11 @@ // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// declare module "3d-bin-packing" { diff --git a/3d-bin-packing/tsconfig.json b/3d-bin-packing/tsconfig.json new file mode 100644 index 0000000000..ddad71a1fe --- /dev/null +++ b/3d-bin-packing/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "3d-bin-packing.d.ts", + "3d-bin-packing-tests.ts" + ] +} \ No newline at end of file diff --git a/angular-q-spread/angular-q-spread-tests.ts b/angular-q-spread/angular-q-spread-tests.ts index 932ecc4fa9..31fad81acd 100644 --- a/angular-q-spread/angular-q-spread-tests.ts +++ b/angular-q-spread/angular-q-spread-tests.ts @@ -1,5 +1,3 @@ -/// - interface IMyService { getFirstname(): ng.IPromise; getLastname(): ng.IPromise; diff --git a/angular-q-spread/angular-q-spread.d.ts b/angular-q-spread/angular-q-spread.d.ts index 3eb37dc4e0..57f6327071 100644 --- a/angular-q-spread/angular-q-spread.d.ts +++ b/angular-q-spread/angular-q-spread.d.ts @@ -3,9 +3,9 @@ // Definitions by: rafw87 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as a from "angular"; -declare module angular { +declare module "angular" { interface IPromise { /** This method can be used as a replacement for then. Similarly, it takes two parameters, a callback when all promises are resolved and a callback for failure. The resolve callback is going to be called with the result of the list of promises passed to $q.all as separate parameters instead of one parameters which is an array. diff --git a/angular-q-spread/tsconfig.json b/angular-q-spread/tsconfig.json new file mode 100644 index 0000000000..90110b0e9f --- /dev/null +++ b/angular-q-spread/tsconfig.json @@ -0,0 +1,19 @@ +{ + "files": [ + "angular-q-spread.d.ts", + "angular-q-spread-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": false + } +} \ No newline at end of file diff --git a/angular-websocket/angular-websocket.d.ts b/angular-websocket/angular-websocket.d.ts index 6929561f9c..9c2c93ea09 100644 --- a/angular-websocket/angular-websocket.d.ts +++ b/angular-websocket/angular-websocket.d.ts @@ -3,155 +3,157 @@ // Definitions by: Nick Veys // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as ng from "angular"; -declare namespace angular.websocket { - - /** - * Options available to be specified for IWebSocketProvider. - */ - type IWebSocketConfigOptions = { - scope?: ng.IScope; - rootScopeFailOver?: boolean; - useApplyAsync?: boolean; - initialTimeout?: number; - maxTimeout?: number; - binaryType?: "blob" | "arraybuffer"; - reconnectIfNotNormalClose?: boolean; - } - interface IWebSocketProvider { - /** - * Creates and opens an IWebSocket instance. - * - * @param url url to connect to - * @return websocket instance - */ - (url: string, protocols?: string | string[] | IWebSocketConfigOptions, options?: IWebSocketConfigOptions): IWebSocket; - } - - /** Options available to be specified for IWebSocket.onMessage */ - type IWebSocketMessageOptions = { +declare module "angular" { + namespace websocket { /** - * If specified, only messages that match the filter will cause the message event - * to be fired. + * Options available to be specified for IWebSocketProvider. */ - filter?: string | RegExp; + type IWebSocketConfigOptions = { + scope?: ng.IScope; + rootScopeFailOver?: boolean; + useApplyAsync?: boolean; + initialTimeout?: number; + maxTimeout?: number; + binaryType?: "blob" | "arraybuffer"; + reconnectIfNotNormalClose?: boolean; + } + interface IWebSocketProvider { + /** + * Creates and opens an IWebSocket instance. + * + * @param url url to connect to + * @return websocket instance + */ + (url: string, protocols?: string | string[] | IWebSocketConfigOptions, options?: IWebSocketConfigOptions): IWebSocket; + } - /** If true, each message handled will safely call `$rootScope.$digest()`. */ - autoApply?: boolean; - } + /** Options available to be specified for IWebSocket.onMessage */ + type IWebSocketMessageOptions = { - /** Type corresponding to onMessage callbaks stored in $Websocket#onMessageCallbacks instance. */ - type IWebSocketMessageHandler = { - fn: (evt: MessageEvent) => void; - pattern: string | RegExp; - autoApply: boolean; - } + /** + * If specified, only messages that match the filter will cause the message event + * to be fired. + */ + filter?: string | RegExp; - /** Type corresponding to items stored in $WebSocket#sendQueue instance. */ - type IWebSocketQueueItem = { - message: any; - defered: ng.IPromise; - } + /** If true, each message handled will safely call `$rootScope.$digest()`. */ + autoApply?: boolean; + } - interface IWebSocket { + /** Type corresponding to onMessage callbaks stored in $Websocket#onMessageCallbacks instance. */ + type IWebSocketMessageHandler = { + fn: (evt: MessageEvent) => void; + pattern: string | RegExp; + autoApply: boolean; + } - /** - * Adds a callback to be executed each time a socket connection is opened for - * this instance. - * - * @param event event object - * @returns this instance, for method chaining - */ - onOpen(callback: (event: Event) => void): IWebSocket; + /** Type corresponding to items stored in $WebSocket#sendQueue instance. */ + type IWebSocketQueueItem = { + message: any; + defered: ng.IPromise; + } - /** - * Adds a callback to be executed each time a socket connection is closed for - * this instance. - * - * @param event event object - * @returns this instance, for method chaining - */ - onClose(callback: (event: CloseEvent) => void): IWebSocket; + interface IWebSocket { - /** - * Adds a callback to be executed each time a socket connection is closed for - * this instance. - * - * @param event event object - * @returns this instance, for method chaining - */ - onError(callback: (event: Event) => void): IWebSocket; + /** + * Adds a callback to be executed each time a socket connection is opened for + * this instance. + * + * @param event event object + * @returns this instance, for method chaining + */ + onOpen(callback: (event: Event) => void): IWebSocket; - /** - * Adds a callback to be executed each time a socket connection has an error for - * this instance. - * - * @param event event object - * @returns this instance, for method chaining - */ - onMessage(callback: (event: MessageEvent) => void, options?: IWebSocketMessageOptions): IWebSocket; + /** + * Adds a callback to be executed each time a socket connection is closed for + * this instance. + * + * @param event event object + * @returns this instance, for method chaining + */ + onClose(callback: (event: CloseEvent) => void): IWebSocket; - /** - * Closes the underlying socket, as long as no data is still being sent from the client. - * - * @param force if `true`, force close even if data is still being sent - * @returns this instance, for method chaining - */ - close(force?: boolean): IWebSocket; + /** + * Adds a callback to be executed each time a socket connection is closed for + * this instance. + * + * @param event event object + * @returns this instance, for method chaining + */ + onError(callback: (event: Event) => void): IWebSocket; - /** - * Adds data to a queue, and attempts to send if the socket is ready. - * - * @param data data to send, if this is an object, it will be stringified before sending - */ - send(data: string | {}): ng.IPromise; + /** + * Adds a callback to be executed each time a socket connection has an error for + * this instance. + * + * @param event event object + * @returns this instance, for method chaining + */ + onMessage(callback: (event: MessageEvent) => void, options?: IWebSocketMessageOptions): IWebSocket; - /** - * WebSocket instance. - */ - socket: WebSocket; + /** + * Closes the underlying socket, as long as no data is still being sent from the client. + * + * @param force if `true`, force close even if data is still being sent + * @returns this instance, for method chaining + */ + close(force?: boolean): IWebSocket; - /** - * Queue of send calls to be made on socket when socket is able to receive data. - */ - sendQueue: IWebSocketQueueItem[]; + /** + * Adds data to a queue, and attempts to send if the socket is ready. + * + * @param data data to send, if this is an object, it will be stringified before sending + */ + send(data: string | {}): ng.IPromise; - /** - * List of callbacks to be executed when the socket is opened. - */ - onOpenCallbacks: ((evt: Event) => void)[]; + /** + * WebSocket instance. + */ + socket: WebSocket; - /** - * List of callbacks to be executed when a message is received from the socket. - */ - onMessageCallbacks: IWebSocketMessageHandler[]; + /** + * Queue of send calls to be made on socket when socket is able to receive data. + */ + sendQueue: IWebSocketQueueItem[]; - /** - * List of callbacks to be executed when an error is received from the socket. - */ - onErrorCallbacks: ((evt: Event) => void)[]; + /** + * List of callbacks to be executed when the socket is opened. + */ + onOpenCallbacks: ((evt: Event) => void)[]; - /** - * List of callbacks to be executed when the socket is closed. - */ - onCloseCallbacks: ((evt: CloseEvent) => void)[]; + /** + * List of callbacks to be executed when a message is received from the socket. + */ + onMessageCallbacks: IWebSocketMessageHandler[]; - /** - * Returns either the readyState value from the underlying WebSocket instance - * or a proprietary value representing the internal state - */ - readyState: number; + /** + * List of callbacks to be executed when an error is received from the socket. + */ + onErrorCallbacks: ((evt: Event) => void)[]; - /** - * The initial timeout. - */ - initialTimeout: number; + /** + * List of callbacks to be executed when the socket is closed. + */ + onCloseCallbacks: ((evt: CloseEvent) => void)[]; - /** - * Maximun timeout used to determine reconnection delay. - */ - maxTimeout: number; + /** + * Returns either the readyState value from the underlying WebSocket instance + * or a proprietary value representing the internal state + */ + readyState: number; + + /** + * The initial timeout. + */ + initialTimeout: number; + + /** + * Maximun timeout used to determine reconnection delay. + */ + maxTimeout: number; + } } } diff --git a/angular-websocket/tsconfig.json b/angular-websocket/tsconfig.json new file mode 100644 index 0000000000..7579a1591c --- /dev/null +++ b/angular-websocket/tsconfig.json @@ -0,0 +1,19 @@ +{ + "files": [ + "angular-websocket.d.ts", + "angular-websocket-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": false + } +} \ No newline at end of file diff --git a/angular-xeditable/angular-xeditable.d.ts b/angular-xeditable/angular-xeditable.d.ts index 026fc5d2fb..e0aba2a0e9 100644 --- a/angular-xeditable/angular-xeditable.d.ts +++ b/angular-xeditable/angular-xeditable.d.ts @@ -3,96 +3,96 @@ // Definitions by: Joao Monteiro // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as angular from "angular"; -declare namespace angular.xeditable { +declare module "angular" { + namespace xeditable { + interface IEditableOptions { - interface IEditableOptions { + /** + * Theme. Possible values `bs3`, `bs2`, `default` + */ + theme: string; - /** - * Theme. Possible values `bs3`, `bs2`, `default` - */ - theme: string; + /** + * Icon Set. Possible values `font-awesome`, `default`. + */ + icon_set: string; - /** - * Icon Set. Possible values `font-awesome`, `default`. - */ - icon_set: string; + /** + * Whether to show buttons for single editalbe element. + * Possible values `right` (default), `no`. + */ + buttons: string; - /** - * Whether to show buttons for single editalbe element. - * Possible values `right` (default), `no`. - */ - buttons: string; + /** + * Default value for `blur` attribute of single editable element. + * Can be `cancel|submit|ignore`. + */ + blurElem: string; - /** - * Default value for `blur` attribute of single editable element. - * Can be `cancel|submit|ignore`. - */ - blurElem: string; + /** + * Default value for `blur` attribute of editable form. + * Can be `cancel|submit|ignore`. + */ + blurForm: string; - /** - * Default value for `blur` attribute of editable form. - * Can be `cancel|submit|ignore`. - */ - blurForm: string; + /** + * How input elements get activated. Possible values: `focus|select|none`. + */ + activate: string; - /** - * How input elements get activated. Possible values: `focus|select|none`. - */ - activate: string; + /** + * Whether to disable x-editable. Can be overloaded on each element. + */ + isDisabled: boolean; - /** - * Whether to disable x-editable. Can be overloaded on each element. - */ - isDisabled: boolean; + /* + * Event, on which the edit mode gets activated. + * Can be any event. + */ + activationEvent: string; + } - /* - * Event, on which the edit mode gets activated. - * Can be any event. - */ - activationEvent: string; + interface IEditableFormController extends angular.IFormController { + + /** + * Shows form with editable controls. + */ + $show(): void; + + /** + * Hides form with editable controls without saving. + */ + $hide(): void; + + /** + * Sets focus on form field specified by `name`.
+ * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called. + * + * @param name name of field + */ + $activate(name: string): void; + + /** + * Triggers `oncancel` event and calls `$hide()`. + */ + $cancel(): void; + + $setWaiting(value: boolean): void; + + /** + * Shows error message for particular field. + * + * @param name name of field + * @param msg error message + */ + $setError(name: string, msg: string): void; + + $submit(): void; + + $save(): void; + + } } - - interface IEditableFormController extends angular.IFormController { - - /** - * Shows form with editable controls. - */ - $show(): void; - - /** - * Hides form with editable controls without saving. - */ - $hide(): void; - - /** - * Sets focus on form field specified by `name`.
- * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called. - * - * @param name name of field - */ - $activate(name: string): void; - - /** - * Triggers `oncancel` event and calls `$hide()`. - */ - $cancel(): void; - - $setWaiting(value: boolean): void; - - /** - * Shows error message for particular field. - * - * @param name name of field - * @param msg error message - */ - $setError(name: string, msg: string): void; - - $submit(): void; - - $save(): void; - - } - } diff --git a/angular-xeditable/tsconfig.json b/angular-xeditable/tsconfig.json new file mode 100644 index 0000000000..e9a9c10c51 --- /dev/null +++ b/angular-xeditable/tsconfig.json @@ -0,0 +1,19 @@ +{ + "files": [ + "angular-xeditable.d.ts", + "angular-xeditable-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": false + } +} \ No newline at end of file diff --git a/backbone-fetch-cache/backbone-fetch-cache-tests.ts b/backbone-fetch-cache/backbone-fetch-cache-tests.ts index e2eb532690..072e3c29ce 100644 --- a/backbone-fetch-cache/backbone-fetch-cache-tests.ts +++ b/backbone-fetch-cache/backbone-fetch-cache-tests.ts @@ -1,6 +1,5 @@ -/// - -import * as Backbone from "backbone-fetch-cache"; +import * as Backbone from "backbone"; +import * as BackboneFetchCache from "backbone-fetch-cache"; // static methods / properties diff --git a/backbone-fetch-cache/backbone-fetch-cache.d.ts b/backbone-fetch-cache/backbone-fetch-cache.d.ts deleted file mode 100644 index 449db1c667..0000000000 --- a/backbone-fetch-cache/backbone-fetch-cache.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -// Type definitions for backbone-fetch-cache 1.4.0 -// Project: https://github.com/madglory/backbone-fetch-cache -// Definitions by: delphinus -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare namespace BackboneFetchCache { - - interface SuperMethods { - - modelFetch(options?: Backbone.ModelFetchOptions): JQueryXHR; - modelSync(...arg: any[]): JQueryXHR; - collectionFetch(options?: Backbone.CollectionFetchOptions): JQueryXHR; - } - - interface GetCacheOptions { - - data?: any; - url?: string; - } - - interface SetCacheOptions extends GetCacheOptions { - - cache: boolean; - expires: boolean | number; - prefill: boolean; - prefillExpires: boolean | number; - } - - interface Cache { - - expires: number; - lastSync: number; - prefillExpires: number; - value: any; - } - - interface GetCacheKeyObject { - - getCacheKey?: (opts?: GetCacheOptions) => string; - url?: () => string; - } - - type GetCacheKeyOptions = string | {url: string} | GetCacheKeyObject; - - interface Static { - - /** - * Global flag to enable/disable caching - */ - enabled: boolean; - - /** - * By default the cache is persisted in localStorage (if available). - * Set Backbone.fetchCache.localStorage = false to disable this. - */ - localStorage: boolean; - - /** - * Sometimes you just need to clear a cached item manually. - * Backbone.fetchCache.clearItem() can be called safely from anywhere - * in your application. It will take your backbone Model or Collection, - * a function that returns the key String, or the key String itself. If - * you pass in a Model or Collection, the .getCacheKey() method will be - * checked before the url property. - */ - clearItem(...args: any[]): any; - - /** - * You can explicitly fetch a cached item, without having to call the - * models/collection fetch. This might be useful for debugging and - * testing. - */ - getCache(key: () => string, opts?: GetCacheOptions): Cache; - getCache(key: GetCacheKeyOptions, opts?: GetCacheOptions): Cache; - - getCacheKey(key: () => string, opts?: GetCacheOptions): string; - getCacheKey(key: GetCacheKeyOptions, opts?: GetCacheOptions): string; - - /** - * If you want to know when was the last (server) sync of a given key, you can use. - */ - getLastSync(key: () => string, opts?: GetCacheOptions): number; - getLastSync(key: GetCacheKeyOptions, opts?: GetCacheOptions): number; - - getLocalStorage(): void; - getLocalStorageKey(): string; - - /** - * When setting items in localStorage, the browser may throw a - * QUOTA_EXCEEDED_ERR, meaning the store is full. Backbone.fetchCache - * tries to work around this problem by deleting what it considers the - * most stale item to make space for the new data. The staleness of - * data is determined by the sorting function priorityFn, which by - * default returns the oldest item. - */ - priorityFn(a: Cache, b: Cache): number; - - reset(): void; - - setCache(instance: () => string, opts?: SetCacheOptions, attrs?: any): void; - setCache(instance: GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void; - - setLocalStorage(...args: any[]): any; - - _superMethods: SuperMethods; - } -} - -declare module Backbone { - - var fetchCache: BackboneFetchCache.Static; - - /** - * The most used API hook for Backbone Fetch Cache is the Model and - * Collection #.fetch() method. Here are the options you can pass into that - * method to get behaviour particular to Backbone Fetch Cache. - */ - interface ModelFetchWithCacheOptions extends ModelFetchOptions { - - /** - * Calls to modelInstance.fetch or collectionInstance.fetch will be - * fulfilled from the cache (if possible) when cache: true is set in - * the options hash. - */ - cache?: boolean; - - context?: any; - - /** - * Cache values expire after 5 minutes by default. You can adjust this - * by passing expires: to the fetch call. Set to false to - * never expire. - */ - expires?: number; - - /** - * This option allows the model/collection to be populated from the - * cache immediately and then be updated once the call to fetch has - * completed. The initial cache hit calls the prefillSuccess callback - * and then the AJAX success/error callbacks are called as normal when - * the request is complete. This allows the page to render something - * immediately and then update it after the request completes. (Note: - * the prefillSuccess callback will not fire if the data is not found - * in the cache.) - * - * prefill and prefillExpires options can be used with the promises - * interface like so (note: the progress event will not fire if the - * data is not found in the cache.). - * - * prefillExpires affects prefill in the following ways: - * - * 1. If the cache doesn't hold the requested data, just fetch it - * (usual behaviour) - * 2. If the cache holds an expired version of the requested data, just - * fetch it (usual behaviour) - * 3. If the cache holds requested data that is neither expired nor - * prefill expired, just return it and don't do a fetch / prefill - * callback (usual cache behavior, unusual prefill behaviour) - * 4. If the cache holds requested data that isn't expired but is - * prefill expired, use the prefill callback and do a fetch (usual - * prefill behaviour) - */ - prefill?: boolean; - prefillExpires?: number; - prefillSuccess?: (self: any, attributes: any, opts: ModelFetchWithCacheOptions) => void; - } - - interface CollectionFetchWithCacheOptions extends ModelFetchWithCacheOptions { - - prefillSuccess?: (self: any) => void; - } - - interface ModelWithCache extends Model { - - fetch(options?: ModelFetchWithCacheOptions): JQueryXHR; - } - - interface CollectionWithCache extends Collection { - - fetch(options?: CollectionFetchWithCacheOptions): JQueryXHR; - } -} - -declare module "backbone-fetch-cache" { - - export = Backbone; -} diff --git a/backbone-fetch-cache/index.d.ts b/backbone-fetch-cache/index.d.ts new file mode 100644 index 0000000000..0067bb4443 --- /dev/null +++ b/backbone-fetch-cache/index.d.ts @@ -0,0 +1,183 @@ +// Type definitions for backbone-fetch-cache 1.4.0 +// Project: https://github.com/madglory/backbone-fetch-cache +// Definitions by: delphinus +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as Backbone from "backbone"; + +interface SuperMethods { + + modelFetch(options?: Backbone.ModelFetchOptions): JQueryXHR; + modelSync(...arg: any[]): JQueryXHR; + collectionFetch(options?: Backbone.CollectionFetchOptions): JQueryXHR; +} + +interface GetCacheOptions { + + data?: any; + url?: string; +} + +interface SetCacheOptions extends GetCacheOptions { + + cache: boolean; + expires: boolean | number; + prefill: boolean; + prefillExpires: boolean | number; +} + +interface Cache { + + expires: number; + lastSync: number; + prefillExpires: number; + value: any; +} + +interface GetCacheKeyObject { + + getCacheKey?: (opts?: GetCacheOptions) => string; + url?: () => string; +} + +type GetCacheKeyOptions = string | {url: string} | GetCacheKeyObject; + +interface Static { + + /** + * Global flag to enable/disable caching + */ + enabled: boolean; + + /** + * By default the cache is persisted in localStorage (if available). + * Set Backbone.fetchCache.localStorage = false to disable this. + */ + localStorage: boolean; + + /** + * Sometimes you just need to clear a cached item manually. + * Backbone.fetchCache.clearItem() can be called safely from anywhere + * in your application. It will take your backbone Model or Collection, + * a function that returns the key String, or the key String itself. If + * you pass in a Model or Collection, the .getCacheKey() method will be + * checked before the url property. + */ + clearItem(...args: any[]): any; + + /** + * You can explicitly fetch a cached item, without having to call the + * models/collection fetch. This might be useful for debugging and + * testing. + */ + getCache(key: () => string, opts?: GetCacheOptions): Cache; + getCache(key: GetCacheKeyOptions, opts?: GetCacheOptions): Cache; + + getCacheKey(key: () => string, opts?: GetCacheOptions): string; + getCacheKey(key: GetCacheKeyOptions, opts?: GetCacheOptions): string; + + /** + * If you want to know when was the last (server) sync of a given key, you can use. + */ + getLastSync(key: () => string, opts?: GetCacheOptions): number; + getLastSync(key: GetCacheKeyOptions, opts?: GetCacheOptions): number; + + getLocalStorage(): void; + getLocalStorageKey(): string; + + /** + * When setting items in localStorage, the browser may throw a + * QUOTA_EXCEEDED_ERR, meaning the store is full. Backbone.fetchCache + * tries to work around this problem by deleting what it considers the + * most stale item to make space for the new data. The staleness of + * data is determined by the sorting function priorityFn, which by + * default returns the oldest item. + */ + priorityFn(a: Cache, b: Cache): number; + + reset(): void; + + setCache(instance: () => string, opts?: SetCacheOptions, attrs?: any): void; + setCache(instance: GetCacheKeyOptions, opts?: SetCacheOptions, attrs?: any): void; + + setLocalStorage(...args: any[]): any; + + _superMethods: SuperMethods; +} + +declare module "backbone" { + + var fetchCache: Static; + + /** + * The most used API hook for Backbone Fetch Cache is the Model and + * Collection #.fetch() method. Here are the options you can pass into that + * method to get behaviour particular to Backbone Fetch Cache. + */ + interface ModelFetchWithCacheOptions extends ModelFetchOptions { + + /** + * Calls to modelInstance.fetch or collectionInstance.fetch will be + * fulfilled from the cache (if possible) when cache: true is set in + * the options hash. + */ + cache?: boolean; + + context?: any; + + /** + * Cache values expire after 5 minutes by default. You can adjust this + * by passing expires: to the fetch call. Set to false to + * never expire. + */ + expires?: number; + + /** + * This option allows the model/collection to be populated from the + * cache immediately and then be updated once the call to fetch has + * completed. The initial cache hit calls the prefillSuccess callback + * and then the AJAX success/error callbacks are called as normal when + * the request is complete. This allows the page to render something + * immediately and then update it after the request completes. (Note: + * the prefillSuccess callback will not fire if the data is not found + * in the cache.) + * + * prefill and prefillExpires options can be used with the promises + * interface like so (note: the progress event will not fire if the + * data is not found in the cache.). + * + * prefillExpires affects prefill in the following ways: + * + * 1. If the cache doesn't hold the requested data, just fetch it + * (usual behaviour) + * 2. If the cache holds an expired version of the requested data, just + * fetch it (usual behaviour) + * 3. If the cache holds requested data that is neither expired nor + * prefill expired, just return it and don't do a fetch / prefill + * callback (usual cache behavior, unusual prefill behaviour) + * 4. If the cache holds requested data that isn't expired but is + * prefill expired, use the prefill callback and do a fetch (usual + * prefill behaviour) + */ + prefill?: boolean; + prefillExpires?: number; + prefillSuccess?: (self: any, attributes: any, opts: ModelFetchWithCacheOptions) => void; + } + + interface CollectionFetchWithCacheOptions extends ModelFetchWithCacheOptions { + + prefillSuccess?: (self: any) => void; + } + + interface ModelWithCache extends Model { + + fetch(options?: ModelFetchWithCacheOptions): JQueryXHR; + } + + interface CollectionWithCache extends Collection { + + fetch(options?: CollectionFetchWithCacheOptions): JQueryXHR; + } +} + +export as namespace BackboneFetchCache; diff --git a/backbone-fetch-cache/tsconfig.json b/backbone-fetch-cache/tsconfig.json new file mode 100644 index 0000000000..563a475286 --- /dev/null +++ b/backbone-fetch-cache/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "backbone-fetch-cache-tests.ts" + ] +} \ No newline at end of file diff --git a/backbone/index.d.ts b/backbone/index.d.ts index f1203c0967..975d7f33c9 100644 --- a/backbone/index.d.ts +++ b/backbone/index.d.ts @@ -58,7 +58,7 @@ declare namespace Backbone { interface ModelSetOptions extends Silenceable, Validable { } - interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable { + export interface ModelFetchOptions extends PersistenceOptions, ModelSetOptions, Parseable { } interface ModelSaveOptions extends Silenceable, Waitable, Validable, Parseable, PersistenceOptions { diff --git a/backlog-js/backlog-js-tests.ts b/backlog-js/backlog-js-tests.ts index 979eb57ca4..8a3e47fbb1 100644 --- a/backlog-js/backlog-js-tests.ts +++ b/backlog-js/backlog-js-tests.ts @@ -1,5 +1,3 @@ -/// - import * as backlogjs from 'backlog-js'; const host = 'example.backlog.jp'; diff --git a/backlog-js/backlog-js.d.ts b/backlog-js/backlog-js.d.ts deleted file mode 100644 index 353e7e90cd..0000000000 --- a/backlog-js/backlog-js.d.ts +++ /dev/null @@ -1,695 +0,0 @@ -// Type definitions for backlog-js 0.9.0 -// Project: https://github.com/nulab/backlog-js -// Definitions by: Yuichi Watanabe -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// -/// - -declare module 'backlog-js' { - - class Request { - private configure; - constructor(configure: { - host: string; - apiKey?: string; - accessToken?: string; - timeout?: number; - }); - get(path: string, params?: any): Promise; - post(path: string, params?: any): Promise; - put(path: string, params: any): Promise; - patch(path: string, params: any): Promise; - delete(path: string, params?: any): Promise; - request(options: { - method: string; - path: string; - params?: Params | FormData; - }): Promise; - checkStatus(response: IResponse): Promise; - parseJSON(response: IResponse): Promise; - private toFormData(params); - private toQueryString(params); - webAppBaseURL: string; - restBaseURL: string; - } - - type Params = { - [index: string]: number | string | number[] | string[]; - }; - - export class Backlog extends Request { - constructor(configure: { - host: string; - apiKey?: string; - accessToken?: string; - timeout?: number; - }); - getSpace(): Promise; - getSpaceActivities(params: Option.Space.GetActivitiesParams): Promise; - getSpaceNotification(): Promise; - putSpaceNotification(params: Option.Space.PutSpaceNotificationParams): Promise; - getSpaceDiskUsage(): Promise; - getSpaceIcon(): Promise; - postSpaceAttachment(form: FormData): Promise; - getUsers(): Promise; - getUser(userId: number): Promise; - postUser(params: Option.User.PostUserParams): Promise; - patchUser(userId: number, params: Option.User.PatchUserParams): Promise; - deleteUser(userId: number): Promise; - getMyself(): Promise; - getUserActivities(userId: number, params: Option.User.GetUserActivitiesParams): Promise; - getUserStars(userId: number, params: Option.User.GetUserStarsParams): Promise; - getUserStarsCount(userId: number, params: Option.User.GetUserStarsCountParams): Promise; - getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise; - getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise; - getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise; - getUserIcon(userId: number): Promise; - getGroups(params: Option.Group.GetGroupsParams): Promise; - postGroups(params: Option.Group.PostGroupsParams): Promise; - getGroup(groupId: number): Promise; - patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise; - deleteGroup(groupId: number): Promise; - getStatuses(): Promise; - getResolutions(): Promise; - getPriorities(): Promise; - postProject(params: Option.Project.PostProjectParams): Promise; - getProjects(params?: Option.Project.GetProjectsParams): Promise; - getProject(projectIdOrKey: string): Promise; - patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise; - deleteProject(projectIdOrKey: string): Promise; - getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise; - getProjectUsers(projectIdOrKey: string): Promise; - deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise; - postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise; - getProjectAdministrators(projectIdOrKey: string): Promise; - deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise; - getIssueTypes(projectIdOrKey: string): Promise; - postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise; - patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise; - deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise; - getCategories(projectIdOrKey: string): Promise; - postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise; - patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise; - deleteCategories(projectIdOrKey: string, id: number): Promise; - getVersions(projectIdOrKey: string): Promise; - postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise; - patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise; - deleteVersions(projectIdOrKey: string, id: number): Promise; - getCustomFields(projectIdOrKey: string): Promise; - postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise; - patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise; - deleteCustomField(projectIdOrKey: string, id: number): Promise; - postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; - patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise; - deleteCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; - getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise; - getProjectsDiskUsage(projectIdOrKey: string): Promise; - getWebhooks(projectIdOrKey: string): Promise; - postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise; - getWebhook(projectIdOrKey: string, webhookId: string): Promise; - patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise; - deleteWebhook(projectIdOrKey: string, webhookId: string): Promise; - postIssue(params: Option.Issue.PostIssueParams): Promise; - patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise; - getIssues(params?: Option.Issue.GetIssuesParams): Promise; - getIssue(issueIdOrKey: string): Promise; - getIssuesCount(params?: Option.Issue.GetIssuesParams): Promise; - deleteIssuesCount(issueIdOrKey: string): Promise; - getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise; - postIssueComments(issueIdOrKey: string, params: Option.Issue.PostIssueCommentsParams): Promise; - getIssueCommentsCount(issueIdOrKey: string): Promise; - getIssueComment(issueIdOrKey: string, commentId: number): Promise; - patchIssueComment(issueIdOrKey: string, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise; - getIssueCommentNotifications(issueIdOrKey: string, commentId: number): Promise; - postIssueCommentNotifications(issueIdOrKey: string, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise; - getIssueAttachments(issueIdOrKey: string): Promise; - deleteIssueAttachment(issueIdOrKey: string, attachmentId: string): Promise; - getIssueSharedFiles(issueIdOrKey: string): Promise; - linkIssueSharedFiles(issueIdOrKey: string, params: Option.Issue.LinkIssueSharedFilesParams): Promise; - unlinkIssueSharedFile(issueIdOrKey: string, id: number): Promise; - getWikis(projectIdOrKey: number): Promise; - getWikisCount(projectIdOrKey: number): Promise; - getWikisTags(projectIdOrKey: number): Promise; - postWiki(params: Option.Wiki.PostWikiParams): Promise; - getWiki(wikiId: number): Promise; - patchWiki(wikiId: number, params: Option.Wiki.PatchWikiParams): Promise; - deleteWiki(wikiId: number, mailNotify: boolean): Promise; - getWikisAttachments(wikiId: number): Promise; - postWikisAttachments(wikiId: number, attachmentId: number[]): Promise; - deleteWikisAttachments(wikiId: number, attachmentId: number): Promise; - getWikisSharedFiles(wikiId: number): Promise; - linkWikisSharedFiles(wikiId: number, fileId: number[]): Promise; - unlinkWikisSharedFiles(wikiId: number, id: number): Promise; - getWikisHistory(wikiId: number, params: Option.Wiki.GetWikisHistoryParams): Promise; - getWikisStars(wikiId: number): Promise; - postStar(params: Option.Project.PostStarParams): Promise; - getNotifications(params: Option.Notification.GetNotificationsParams): Promise; - getNotificationsCount(params: Option.Notification.GetNotificationsCountParams): Promise; - resetNotificationsMarkAsRead(): Promise; - markAsReadNotification(id: number): Promise; - getGitRepositories(projectIdOrKey: string): Promise; - getGitRepository(projectIdOrKey: string, repoIdOrName: string): Promise; - getPullRequests(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; - getPullRequestsCount(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; - postPullRequest(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise; - getPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; - patchPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise; - getPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise; - postPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise; - getPullRequestCommentsCount(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; - patchPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise; - getPullRequestAttachments(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; - deletePullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; - getProjectIcon(projectIdOrKey: string): Promise; - getSharedFile(projectIdOrKey: string, sharedFileId: number): Promise; - getIssueAttachment(issueIdOrKey: string, attachmentId: number): Promise; - getWikiAttachment(wikiId: number, attachmentId: number): Promise; - getPullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; - private download(path); - private upload(path, params); - private parseFileData(response); - } - - export class OAuth2 { - private credentials; - private timeout; - constructor(credentials: Option.OAuth2.Credentials, timeout?: number); - getAuthorizationURL(options: { - host: string; - redirectUri?: string; - state?: string; - }): string; - getAccessToken(options: { - host: string; - code: string; - redirectUri?: string; - }): Promise; - refreshAccessToken(options: { - host: string; - refreshToken: string; - }): Promise; - } - - import { PassThrough } from 'stream'; - export namespace Entity { - export namespace File { - export type FileData = NodeFileData | BrowserFileData; - export interface NodeFileData { - body: PassThrough; - url: string; - filename: string; - } - export interface BrowserFileData { - body: any; - url: string; - blob?: () => Promise; - } - } - export namespace OAuth2 { - export interface AccessToken { - access_token: string; - token_type: string; - expires_in: number; - refresh_token: string; - } - } - } - - - export namespace Option { - export type Order = "asc" | "desc"; - export enum ActivityType { - Undefined = -1, - IssueCreated = 1, - IssueUpdated = 2, - IssueCommented = 3, - IssueDeleted = 4, - WikiCreated = 5, - WikiUpdated = 6, - WikiDeleted = 7, - FileAdded = 8, - FileUpdated = 9, - FileDeleted = 10, - SvnCommitted = 11, - GitPushed = 12, - GitRepositoryCreated = 13, - IssueMultiUpdated = 14, - ProjectUserAdded = 15, - ProjectUserRemoved = 16, - NotifyAdded = 17, - PullRequestAdded = 18, - PullRequestUpdated = 19, - PullRequestCommented = 20, - PullRequestMerged = 21, - } - export namespace Notification { - export interface GetNotificationsParams { - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface GetNotificationsCountParams { - alreadyRead: boolean; - resourceAlreadyRead: boolean; - } - } - export namespace Space { - export interface GetActivitiesParams { - activityTypeId?: ActivityType[]; - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface PutSpaceNotificationParams { - content: string; - } - } - export namespace User { - export interface PostUserParams { - userId: string; - password: string; - name: string; - mailAddress: string; - roleType: RoleType; - } - export interface PatchUserParams { - password?: string; - name?: string; - mailAddress?: string; - roleType?: RoleType; - } - export enum RoleType { - Admin = 1, - User = 2, - Reporter = 3, - Viewer = 4, - GuestReporter = 5, - GuestViewer = 6, - } - export interface GetUserActivitiesParams { - activityTypeId?: ActivityType[]; - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface GetUserStarsParams { - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface GetUserStarsCountParams { - since?: string; - until?: string; - } - export interface GetRecentlyViewedParams { - order?: Order; - offset?: number; - count?: number; - } - } - export namespace Group { - export interface GetGroupsParams { - order?: Order; - offset?: number; - count?: number; - } - export interface PostGroupsParams { - name: string; - members?: string[]; - } - export interface PatchGroupParams { - name?: string; - members?: string[]; - } - } - export namespace Project { - export type TextFormattingRule = "backlog" | "markdown"; - export interface PostProjectParams { - name: string; - key: string; - chartEnabled: boolean; - projectLeaderCanEditProjectLeader?: boolean; - subtaskingEnabled: boolean; - textFormattingRule: TextFormattingRule; - } - export interface PatchProjectParams { - name?: string; - key?: string; - chartEnabled?: boolean; - subtaskingEnabled?: boolean; - projectLeaderCanEditProjectLeader?: boolean; - textFormattingRule?: TextFormattingRule; - archived?: boolean; - } - export interface GetProjectsParams { - archived?: boolean; - all?: boolean; - } - export interface DeleteProjectUsersParams { - userId: number; - } - export interface PostProjectAdministrators { - userId: number; - } - export interface DeleteProjectAdministrators { - userId: number; - } - export type IssueTypeColor = "#e30000" | "#990000" | "#934981" | "#814fbc" | "#2779ca" | "#007e9a" | "#7ea800" | "#ff9200" | "#ff3265" | "#666665"; - export interface PostIssueTypeParams { - name: string; - color: IssueTypeColor; - } - export interface PatchIssueTypeParams { - name?: string; - color?: IssueTypeColor; - } - export interface DeleteIssueTypeParams { - substituteIssueTypeId: number; - } - export interface PostCategoriesParams { - name: string; - } - export interface PatchCategoriesParams { - name: string; - } - export interface PostVersionsParams { - name: string; - description: string; - startDate: string; - releaseDueDate: string; - } - export interface PatchVersionsParams { - name: string; - description?: string; - startDate?: string; - releaseDueDate?: string; - archived?: boolean; - } - export interface PostCustomFieldParams { - typeId: FieldType; - name: string; - applicableIssueTypes?: number[]; - description?: string; - required?: boolean; - } - export interface PostCustomFieldWithNumericParams extends PostCustomFieldParams { - min?: number; - max?: number; - initialValue?: number; - unit?: string; - } - export interface PostCustomFieldWithDateParams extends PostCustomFieldParams { - min?: string; - max?: string; - initialValueType?: number; - initialDate?: string; - initialShift?: number; - } - export interface PostCustomFieldWithListParams extends PostCustomFieldParams { - items?: string[]; - allowInput?: boolean; - allowAddItem?: boolean; - } - export interface PatchCustomFieldParams { - name?: string; - applicableIssueTypes?: number[]; - description?: string; - required?: boolean; - } - export interface PatchCustomFieldWithNumericParams extends PatchCustomFieldParams { - min?: number; - max?: number; - initialValue?: number; - unit?: string; - } - export interface PatchCustomFieldWithDateParams extends PatchCustomFieldParams { - min?: string; - max?: string; - initialValueType?: number; - initialDate?: string; - initialShift?: number; - } - export interface PatchCustomFieldWithListParams extends PatchCustomFieldParams { - items?: string[]; - allowInput?: boolean; - allowAddItem?: boolean; - } - export interface PostCustomFieldItemParams { - name: string; - } - export interface PatchCustomFieldItemParams { - name: string; - } - export interface GetSharedFilesParams { - order?: Order; - offset?: number; - count?: number; - } - export interface PostWebhookParams { - name?: string; - description?: string; - hookUrl?: string; - allEvent?: boolean; - activityTypeIds?: number[]; - } - export interface PatchWebhookParams { - name?: string; - description?: string; - hookUrl?: string; - allEvent?: boolean; - activityTypeIds?: number[]; - } - export enum FieldType { - Text = 1, - TextArea = 2, - Numeric = 3, - Date = 4, - SingleList = 5, - MultipleList = 6, - CheckBox = 7, - Radio = 8, - } - export interface PostStarParams { - issueId?: number; - commentId?: number; - wikiId?: number; - pullRequestId?: number; - pullRequestCommentId?: number; - } - } - export namespace Issue { - export interface PostIssueParams { - projectId: number; - summary: string; - priorityId: number; - issueTypeId: number; - parentIssueId?: number; - description?: string; - startDate?: string; - dueDate?: string; - estimatedHours?: number; - actualHours?: number; - categoryId?: number[]; - versionId?: number[]; - milestoneId?: number[]; - assigneeId?: number; - notifiedUserId?: number[]; - attachmentId?: number[]; - [customField_: string]: any; - } - export interface PatchIssueParams { - summary?: string; - parentIssueId?: number; - description?: string; - statusId?: number; - resolutionId?: number; - startDate?: string; - dueDate?: string; - estimatedHours?: number; - actualHours?: number; - issueTypeId?: number; - categoryId?: number[]; - versionId?: number[]; - milestoneId?: number[]; - priorityId?: number; - assigneeId?: number; - notifiedUserId?: number[]; - attachmentId?: number[]; - comment?: string; - [customField_: string]: any; - } - export interface GetIssuesParams { - projectId?: number[]; - issueTypeId?: number[]; - categoryId?: number[]; - versionId?: number[]; - milestoneId?: number[]; - statusId?: number[]; - priorityId?: number[]; - assigneeId?: number[]; - createdUserId?: number[]; - resolutionId?: number[]; - parentChild?: ParentChildType; - attachment?: boolean; - sharedFile?: boolean; - sort?: SortKey; - order?: Order; - offset?: number; - count?: number; - createdSince?: string; - createdUntil?: string; - updatedSince?: string; - updatedUntil?: string; - startDateSince?: string; - startDateUntil?: string; - dueDateSince?: string; - dueDateUntil?: string; - id?: number[]; - parentIssueId?: number[]; - keyword: string; - [customField_: string]: any; - } - export enum ParentChildType { - All = 0, - NotChild = 1, - Child = 2, - NotChildNotParent = 3, - Parent = 4, - } - export type SortKey = "issueType" | "category" | "version" | "milestone" | "summary" | "status" | "priority" | "attachment" | "sharedFile" | "created" | "createdUser" | "updated" | "updatedUser" | "assignee" | "startDate" | "dueDate" | "estimatedHours" | "actualHours" | "childIssue"; - export interface GetIssueCommentsParams { - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface PostIssueCommentsParams { - content: string; - notifiedUserId?: number[]; - attachmentId?: number[]; - } - export interface PatchIssueCommentParams { - content: string; - } - export interface IssueCommentNotifications { - notifiedUserId: number[]; - } - export interface LinkIssueSharedFilesParams { - fileId: number[]; - } - } - export namespace PullRequest { - export interface GetPullRequestsParams { - statusId?: number[]; - assigneeId?: number[]; - issueId?: number[]; - createdUserId?: number[]; - offset?: number; - count?: number; - } - export interface PostPullRequestParams { - summary: string; - description: string; - base: string; - branch: string; - issueId?: number; - assigneeId?: number; - notifiedUserId?: number[]; - attachmentId?: number[]; - } - export interface PatchPullRequestParams { - summary?: string; - description?: string; - issueId?: number; - assigneeId?: number; - notifiedUserId?: number[]; - comment?: string[]; - } - export interface GetPullRequestCommentsParams { - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - export interface PostPullRequestCommentsParams { - content: string; - notifiedUserId?: number[]; - } - export interface PatchPullRequestCommentsParams { - content: string; - } - } - export namespace Wiki { - export interface PostWikiParams { - projectId: number; - name: string; - content: string; - mailNotify?: boolean; - } - export interface PatchWikiParams { - name?: string; - content?: string; - mailNotify?: boolean; - } - export interface GetWikisHistoryParams { - minId?: number; - maxId?: number; - count?: number; - order?: Order; - } - } - export namespace OAuth2 { - export interface Credentials { - clientId: string; - clientSecret: string; - } - } - } - - export namespace Error { - export class BacklogError extends global.Error { - private _name; - private _url; - private _status; - private _body; - private _response; - constructor(name: BacklogErrorNameType, response: IResponse, body?: { - errors: BacklogErrorMessage[]; - }); - name: BacklogErrorNameType; - url: string; - status: number; - body: { - errors: BacklogErrorMessage[]; - }; - response: IResponse; - } - export class BacklogApiError extends BacklogError { - constructor(response: IResponse, body?: { - errors: BacklogErrorMessage[]; - }); - } - export class BacklogAuthError extends BacklogError { - constructor(response: IResponse, body?: { - errors: BacklogErrorMessage[]; - }); - } - export class UnexpectedError extends BacklogError { - constructor(response: IResponse); - } - export interface BacklogErrorMessage { - message: string; - code: number; - errorInfo: string; - moreInfo: string; - } - export type BacklogErrorNameType = 'BacklogApiError' | 'BacklogAuthError' | 'UnexpectedError'; - } - -} diff --git a/backlog-js/index.d.ts b/backlog-js/index.d.ts new file mode 100644 index 0000000000..b15602f958 --- /dev/null +++ b/backlog-js/index.d.ts @@ -0,0 +1,690 @@ +// Type definitions for backlog-js 0.9.0 +// Project: https://github.com/nulab/backlog-js +// Definitions by: Yuichi Watanabe +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +/// + +declare class Request { + private configure; + constructor(configure: { + host: string; + apiKey?: string; + accessToken?: string; + timeout?: number; + }); + get(path: string, params?: any): Promise; + post(path: string, params?: any): Promise; + put(path: string, params: any): Promise; + patch(path: string, params: any): Promise; + delete(path: string, params?: any): Promise; + request(options: { + method: string; + path: string; + params?: Params | FormData; + }): Promise; + checkStatus(response: IResponse): Promise; + parseJSON(response: IResponse): Promise; + private toFormData(params); + private toQueryString(params); + webAppBaseURL: string; + restBaseURL: string; +} + +type Params = { + [index: string]: number | string | number[] | string[]; +}; + +export class Backlog extends Request { + constructor(configure: { + host: string; + apiKey?: string; + accessToken?: string; + timeout?: number; + }); + getSpace(): Promise; + getSpaceActivities(params: Option.Space.GetActivitiesParams): Promise; + getSpaceNotification(): Promise; + putSpaceNotification(params: Option.Space.PutSpaceNotificationParams): Promise; + getSpaceDiskUsage(): Promise; + getSpaceIcon(): Promise; + postSpaceAttachment(form: FormData): Promise; + getUsers(): Promise; + getUser(userId: number): Promise; + postUser(params: Option.User.PostUserParams): Promise; + patchUser(userId: number, params: Option.User.PatchUserParams): Promise; + deleteUser(userId: number): Promise; + getMyself(): Promise; + getUserActivities(userId: number, params: Option.User.GetUserActivitiesParams): Promise; + getUserStars(userId: number, params: Option.User.GetUserStarsParams): Promise; + getUserStarsCount(userId: number, params: Option.User.GetUserStarsCountParams): Promise; + getRecentlyViewedIssues(params: Option.User.GetRecentlyViewedParams): Promise; + getRecentlyViewedProjects(params: Option.User.GetRecentlyViewedParams): Promise; + getRecentlyViewedWikis(params: Option.User.GetRecentlyViewedParams): Promise; + getUserIcon(userId: number): Promise; + getGroups(params: Option.Group.GetGroupsParams): Promise; + postGroups(params: Option.Group.PostGroupsParams): Promise; + getGroup(groupId: number): Promise; + patchGroup(groupId: number, params: Option.Group.PatchGroupParams): Promise; + deleteGroup(groupId: number): Promise; + getStatuses(): Promise; + getResolutions(): Promise; + getPriorities(): Promise; + postProject(params: Option.Project.PostProjectParams): Promise; + getProjects(params?: Option.Project.GetProjectsParams): Promise; + getProject(projectIdOrKey: string): Promise; + patchProject(projectIdOrKey: string, params: Option.Project.PatchProjectParams): Promise; + deleteProject(projectIdOrKey: string): Promise; + getProjectActivities(projectIdOrKey: string, params: Option.Space.GetActivitiesParams): Promise; + getProjectUsers(projectIdOrKey: string): Promise; + deleteProjectUsers(projectIdOrKey: string, params: Option.Project.DeleteProjectUsersParams): Promise; + postProjectAdministrators(projectIdOrKey: string, params: Option.Project.PostProjectAdministrators): Promise; + getProjectAdministrators(projectIdOrKey: string): Promise; + deleteProjectAdministrators(projectIdOrKey: string, params: Option.Project.DeleteProjectAdministrators): Promise; + getIssueTypes(projectIdOrKey: string): Promise; + postIssueType(projectIdOrKey: string, params: Option.Project.PostIssueTypeParams): Promise; + patchIssueType(projectIdOrKey: string, id: number, params: Option.Project.PatchIssueTypeParams): Promise; + deleteIssueType(projectIdOrKey: string, id: number, params: Option.Project.DeleteIssueTypeParams): Promise; + getCategories(projectIdOrKey: string): Promise; + postCategories(projectIdOrKey: string, params: Option.Project.PostCategoriesParams): Promise; + patchCategories(projectIdOrKey: string, id: number, params: Option.Project.PatchCategoriesParams): Promise; + deleteCategories(projectIdOrKey: string, id: number): Promise; + getVersions(projectIdOrKey: string): Promise; + postVersions(projectIdOrKey: string, params: Option.Project.PostVersionsParams): Promise; + patchVersions(projectIdOrKey: string, id: number, params: Option.Project.PatchVersionsParams): Promise; + deleteVersions(projectIdOrKey: string, id: number): Promise; + getCustomFields(projectIdOrKey: string): Promise; + postCustomField(projectIdOrKey: string, params: Option.Project.PostCustomFieldParams | Option.Project.PostCustomFieldWithNumericParams | Option.Project.PostCustomFieldWithDateParams | Option.Project.PostCustomFieldWithListParams): Promise; + patchCustomField(projectIdOrKey: string, id: number, params: Option.Project.PatchCustomFieldParams | Option.Project.PatchCustomFieldWithNumericParams | Option.Project.PatchCustomFieldWithDateParams | Option.Project.PatchCustomFieldWithListParams): Promise; + deleteCustomField(projectIdOrKey: string, id: number): Promise; + postCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; + patchCustomFieldItem(projectIdOrKey: string, id: number, itemId: number, params: Option.Project.PatchCustomFieldItemParams): Promise; + deleteCustomFieldItem(projectIdOrKey: string, id: number, params: Option.Project.PostCustomFieldItemParams): Promise; + getSharedFiles(projectIdOrKey: string, path: string, params: Option.Project.GetSharedFilesParams): Promise; + getProjectsDiskUsage(projectIdOrKey: string): Promise; + getWebhooks(projectIdOrKey: string): Promise; + postWebhook(projectIdOrKey: string, params: Option.Project.PostWebhookParams): Promise; + getWebhook(projectIdOrKey: string, webhookId: string): Promise; + patchWebhook(projectIdOrKey: string, webhookId: string, params: Option.Project.PatchWebhookParams): Promise; + deleteWebhook(projectIdOrKey: string, webhookId: string): Promise; + postIssue(params: Option.Issue.PostIssueParams): Promise; + patchIssue(issueIdOrKey: string, params: Option.Issue.PatchIssueParams): Promise; + getIssues(params?: Option.Issue.GetIssuesParams): Promise; + getIssue(issueIdOrKey: string): Promise; + getIssuesCount(params?: Option.Issue.GetIssuesParams): Promise; + deleteIssuesCount(issueIdOrKey: string): Promise; + getIssueComments(issueIdOrKey: string, params: Option.Issue.GetIssueCommentsParams): Promise; + postIssueComments(issueIdOrKey: string, params: Option.Issue.PostIssueCommentsParams): Promise; + getIssueCommentsCount(issueIdOrKey: string): Promise; + getIssueComment(issueIdOrKey: string, commentId: number): Promise; + patchIssueComment(issueIdOrKey: string, commentId: number, params: Option.Issue.PatchIssueCommentParams): Promise; + getIssueCommentNotifications(issueIdOrKey: string, commentId: number): Promise; + postIssueCommentNotifications(issueIdOrKey: string, commentId: number, prams: Option.Issue.IssueCommentNotifications): Promise; + getIssueAttachments(issueIdOrKey: string): Promise; + deleteIssueAttachment(issueIdOrKey: string, attachmentId: string): Promise; + getIssueSharedFiles(issueIdOrKey: string): Promise; + linkIssueSharedFiles(issueIdOrKey: string, params: Option.Issue.LinkIssueSharedFilesParams): Promise; + unlinkIssueSharedFile(issueIdOrKey: string, id: number): Promise; + getWikis(projectIdOrKey: number): Promise; + getWikisCount(projectIdOrKey: number): Promise; + getWikisTags(projectIdOrKey: number): Promise; + postWiki(params: Option.Wiki.PostWikiParams): Promise; + getWiki(wikiId: number): Promise; + patchWiki(wikiId: number, params: Option.Wiki.PatchWikiParams): Promise; + deleteWiki(wikiId: number, mailNotify: boolean): Promise; + getWikisAttachments(wikiId: number): Promise; + postWikisAttachments(wikiId: number, attachmentId: number[]): Promise; + deleteWikisAttachments(wikiId: number, attachmentId: number): Promise; + getWikisSharedFiles(wikiId: number): Promise; + linkWikisSharedFiles(wikiId: number, fileId: number[]): Promise; + unlinkWikisSharedFiles(wikiId: number, id: number): Promise; + getWikisHistory(wikiId: number, params: Option.Wiki.GetWikisHistoryParams): Promise; + getWikisStars(wikiId: number): Promise; + postStar(params: Option.Project.PostStarParams): Promise; + getNotifications(params: Option.Notification.GetNotificationsParams): Promise; + getNotificationsCount(params: Option.Notification.GetNotificationsCountParams): Promise; + resetNotificationsMarkAsRead(): Promise; + markAsReadNotification(id: number): Promise; + getGitRepositories(projectIdOrKey: string): Promise; + getGitRepository(projectIdOrKey: string, repoIdOrName: string): Promise; + getPullRequests(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; + getPullRequestsCount(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.GetPullRequestsParams): Promise; + postPullRequest(projectIdOrKey: string, repoIdOrName: string, params: Option.PullRequest.PostPullRequestParams): Promise; + getPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + patchPullRequest(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PatchPullRequestParams): Promise; + getPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.GetPullRequestCommentsParams): Promise; + postPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, params: Option.PullRequest.PostPullRequestCommentsParams): Promise; + getPullRequestCommentsCount(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + patchPullRequestComments(projectIdOrKey: string, repoIdOrName: string, number: number, commentId: number, params: Option.PullRequest.PatchPullRequestCommentsParams): Promise; + getPullRequestAttachments(projectIdOrKey: string, repoIdOrName: string, number: number): Promise; + deletePullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; + getProjectIcon(projectIdOrKey: string): Promise; + getSharedFile(projectIdOrKey: string, sharedFileId: number): Promise; + getIssueAttachment(issueIdOrKey: string, attachmentId: number): Promise; + getWikiAttachment(wikiId: number, attachmentId: number): Promise; + getPullRequestAttachment(projectIdOrKey: string, repoIdOrName: string, number: number, attachmentId: number): Promise; + private download(path); + private upload(path, params); + private parseFileData(response); +} + +export class OAuth2 { + private credentials; + private timeout; + constructor(credentials: Option.OAuth2.Credentials, timeout?: number); + getAuthorizationURL(options: { + host: string; + redirectUri?: string; + state?: string; + }): string; + getAccessToken(options: { + host: string; + code: string; + redirectUri?: string; + }): Promise; + refreshAccessToken(options: { + host: string; + refreshToken: string; + }): Promise; +} + +import { PassThrough } from 'stream'; +export namespace Entity { + export namespace File { + export type FileData = NodeFileData | BrowserFileData; + export interface NodeFileData { + body: PassThrough; + url: string; + filename: string; + } + export interface BrowserFileData { + body: any; + url: string; + blob?: () => Promise; + } + } + export namespace OAuth2 { + export interface AccessToken { + access_token: string; + token_type: string; + expires_in: number; + refresh_token: string; + } + } +} + + +export namespace Option { + export type Order = "asc" | "desc"; + export enum ActivityType { + Undefined = -1, + IssueCreated = 1, + IssueUpdated = 2, + IssueCommented = 3, + IssueDeleted = 4, + WikiCreated = 5, + WikiUpdated = 6, + WikiDeleted = 7, + FileAdded = 8, + FileUpdated = 9, + FileDeleted = 10, + SvnCommitted = 11, + GitPushed = 12, + GitRepositoryCreated = 13, + IssueMultiUpdated = 14, + ProjectUserAdded = 15, + ProjectUserRemoved = 16, + NotifyAdded = 17, + PullRequestAdded = 18, + PullRequestUpdated = 19, + PullRequestCommented = 20, + PullRequestMerged = 21, + } + export namespace Notification { + export interface GetNotificationsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetNotificationsCountParams { + alreadyRead: boolean; + resourceAlreadyRead: boolean; + } + } + export namespace Space { + export interface GetActivitiesParams { + activityTypeId?: ActivityType[]; + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PutSpaceNotificationParams { + content: string; + } + } + export namespace User { + export interface PostUserParams { + userId: string; + password: string; + name: string; + mailAddress: string; + roleType: RoleType; + } + export interface PatchUserParams { + password?: string; + name?: string; + mailAddress?: string; + roleType?: RoleType; + } + export enum RoleType { + Admin = 1, + User = 2, + Reporter = 3, + Viewer = 4, + GuestReporter = 5, + GuestViewer = 6, + } + export interface GetUserActivitiesParams { + activityTypeId?: ActivityType[]; + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetUserStarsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface GetUserStarsCountParams { + since?: string; + until?: string; + } + export interface GetRecentlyViewedParams { + order?: Order; + offset?: number; + count?: number; + } + } + export namespace Group { + export interface GetGroupsParams { + order?: Order; + offset?: number; + count?: number; + } + export interface PostGroupsParams { + name: string; + members?: string[]; + } + export interface PatchGroupParams { + name?: string; + members?: string[]; + } + } + export namespace Project { + export type TextFormattingRule = "backlog" | "markdown"; + export interface PostProjectParams { + name: string; + key: string; + chartEnabled: boolean; + projectLeaderCanEditProjectLeader?: boolean; + subtaskingEnabled: boolean; + textFormattingRule: TextFormattingRule; + } + export interface PatchProjectParams { + name?: string; + key?: string; + chartEnabled?: boolean; + subtaskingEnabled?: boolean; + projectLeaderCanEditProjectLeader?: boolean; + textFormattingRule?: TextFormattingRule; + archived?: boolean; + } + export interface GetProjectsParams { + archived?: boolean; + all?: boolean; + } + export interface DeleteProjectUsersParams { + userId: number; + } + export interface PostProjectAdministrators { + userId: number; + } + export interface DeleteProjectAdministrators { + userId: number; + } + export type IssueTypeColor = "#e30000" | "#990000" | "#934981" | "#814fbc" | "#2779ca" | "#007e9a" | "#7ea800" | "#ff9200" | "#ff3265" | "#666665"; + export interface PostIssueTypeParams { + name: string; + color: IssueTypeColor; + } + export interface PatchIssueTypeParams { + name?: string; + color?: IssueTypeColor; + } + export interface DeleteIssueTypeParams { + substituteIssueTypeId: number; + } + export interface PostCategoriesParams { + name: string; + } + export interface PatchCategoriesParams { + name: string; + } + export interface PostVersionsParams { + name: string; + description: string; + startDate: string; + releaseDueDate: string; + } + export interface PatchVersionsParams { + name: string; + description?: string; + startDate?: string; + releaseDueDate?: string; + archived?: boolean; + } + export interface PostCustomFieldParams { + typeId: FieldType; + name: string; + applicableIssueTypes?: number[]; + description?: string; + required?: boolean; + } + export interface PostCustomFieldWithNumericParams extends PostCustomFieldParams { + min?: number; + max?: number; + initialValue?: number; + unit?: string; + } + export interface PostCustomFieldWithDateParams extends PostCustomFieldParams { + min?: string; + max?: string; + initialValueType?: number; + initialDate?: string; + initialShift?: number; + } + export interface PostCustomFieldWithListParams extends PostCustomFieldParams { + items?: string[]; + allowInput?: boolean; + allowAddItem?: boolean; + } + export interface PatchCustomFieldParams { + name?: string; + applicableIssueTypes?: number[]; + description?: string; + required?: boolean; + } + export interface PatchCustomFieldWithNumericParams extends PatchCustomFieldParams { + min?: number; + max?: number; + initialValue?: number; + unit?: string; + } + export interface PatchCustomFieldWithDateParams extends PatchCustomFieldParams { + min?: string; + max?: string; + initialValueType?: number; + initialDate?: string; + initialShift?: number; + } + export interface PatchCustomFieldWithListParams extends PatchCustomFieldParams { + items?: string[]; + allowInput?: boolean; + allowAddItem?: boolean; + } + export interface PostCustomFieldItemParams { + name: string; + } + export interface PatchCustomFieldItemParams { + name: string; + } + export interface GetSharedFilesParams { + order?: Order; + offset?: number; + count?: number; + } + export interface PostWebhookParams { + name?: string; + description?: string; + hookUrl?: string; + allEvent?: boolean; + activityTypeIds?: number[]; + } + export interface PatchWebhookParams { + name?: string; + description?: string; + hookUrl?: string; + allEvent?: boolean; + activityTypeIds?: number[]; + } + export enum FieldType { + Text = 1, + TextArea = 2, + Numeric = 3, + Date = 4, + SingleList = 5, + MultipleList = 6, + CheckBox = 7, + Radio = 8, + } + export interface PostStarParams { + issueId?: number; + commentId?: number; + wikiId?: number; + pullRequestId?: number; + pullRequestCommentId?: number; + } + } + export namespace Issue { + export interface PostIssueParams { + projectId: number; + summary: string; + priorityId: number; + issueTypeId: number; + parentIssueId?: number; + description?: string; + startDate?: string; + dueDate?: string; + estimatedHours?: number; + actualHours?: number; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + [customField_: string]: any; + } + export interface PatchIssueParams { + summary?: string; + parentIssueId?: number; + description?: string; + statusId?: number; + resolutionId?: number; + startDate?: string; + dueDate?: string; + estimatedHours?: number; + actualHours?: number; + issueTypeId?: number; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + priorityId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + comment?: string; + [customField_: string]: any; + } + export interface GetIssuesParams { + projectId?: number[]; + issueTypeId?: number[]; + categoryId?: number[]; + versionId?: number[]; + milestoneId?: number[]; + statusId?: number[]; + priorityId?: number[]; + assigneeId?: number[]; + createdUserId?: number[]; + resolutionId?: number[]; + parentChild?: ParentChildType; + attachment?: boolean; + sharedFile?: boolean; + sort?: SortKey; + order?: Order; + offset?: number; + count?: number; + createdSince?: string; + createdUntil?: string; + updatedSince?: string; + updatedUntil?: string; + startDateSince?: string; + startDateUntil?: string; + dueDateSince?: string; + dueDateUntil?: string; + id?: number[]; + parentIssueId?: number[]; + keyword: string; + [customField_: string]: any; + } + export enum ParentChildType { + All = 0, + NotChild = 1, + Child = 2, + NotChildNotParent = 3, + Parent = 4, + } + export type SortKey = "issueType" | "category" | "version" | "milestone" | "summary" | "status" | "priority" | "attachment" | "sharedFile" | "created" | "createdUser" | "updated" | "updatedUser" | "assignee" | "startDate" | "dueDate" | "estimatedHours" | "actualHours" | "childIssue"; + export interface GetIssueCommentsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PostIssueCommentsParams { + content: string; + notifiedUserId?: number[]; + attachmentId?: number[]; + } + export interface PatchIssueCommentParams { + content: string; + } + export interface IssueCommentNotifications { + notifiedUserId: number[]; + } + export interface LinkIssueSharedFilesParams { + fileId: number[]; + } + } + export namespace PullRequest { + export interface GetPullRequestsParams { + statusId?: number[]; + assigneeId?: number[]; + issueId?: number[]; + createdUserId?: number[]; + offset?: number; + count?: number; + } + export interface PostPullRequestParams { + summary: string; + description: string; + base: string; + branch: string; + issueId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + attachmentId?: number[]; + } + export interface PatchPullRequestParams { + summary?: string; + description?: string; + issueId?: number; + assigneeId?: number; + notifiedUserId?: number[]; + comment?: string[]; + } + export interface GetPullRequestCommentsParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + export interface PostPullRequestCommentsParams { + content: string; + notifiedUserId?: number[]; + } + export interface PatchPullRequestCommentsParams { + content: string; + } + } + export namespace Wiki { + export interface PostWikiParams { + projectId: number; + name: string; + content: string; + mailNotify?: boolean; + } + export interface PatchWikiParams { + name?: string; + content?: string; + mailNotify?: boolean; + } + export interface GetWikisHistoryParams { + minId?: number; + maxId?: number; + count?: number; + order?: Order; + } + } + export namespace OAuth2 { + export interface Credentials { + clientId: string; + clientSecret: string; + } + } +} + +export namespace Error { + export class BacklogError extends global.Error { + private _name; + private _url; + private _status; + private _body; + private _response; + constructor(name: BacklogErrorNameType, response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + name: BacklogErrorNameType; + url: string; + status: number; + body: { + errors: BacklogErrorMessage[]; + }; + response: IResponse; + } + export class BacklogApiError extends BacklogError { + constructor(response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + } + export class BacklogAuthError extends BacklogError { + constructor(response: IResponse, body?: { + errors: BacklogErrorMessage[]; + }); + } + export class UnexpectedError extends BacklogError { + constructor(response: IResponse); + } + export interface BacklogErrorMessage { + message: string; + code: number; + errorInfo: string; + moreInfo: string; + } + export type BacklogErrorNameType = 'BacklogApiError' | 'BacklogAuthError' | 'UnexpectedError'; +} diff --git a/backlog-js/tsconfig.json b/backlog-js/tsconfig.json new file mode 100644 index 0000000000..cd1d4da21f --- /dev/null +++ b/backlog-js/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "backlog-js-tests.ts" + ] +} \ No newline at end of file diff --git a/bootstrap-fileinput/bootstrap-fileinput.d.ts b/bootstrap-fileinput/bootstrap-fileinput.d.ts index fadfadd612..139ca2c490 100644 --- a/bootstrap-fileinput/bootstrap-fileinput.d.ts +++ b/bootstrap-fileinput/bootstrap-fileinput.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ché Coxshall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// interface JQuery { fileinput: (options?: BootstrapFileInput.FileInputOptions) => JQuery; diff --git a/bootstrap-fileinput/tsconfig.json b/bootstrap-fileinput/tsconfig.json new file mode 100644 index 0000000000..5b7c6fc2bf --- /dev/null +++ b/bootstrap-fileinput/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "bootstrap-fileinput.d.ts" + ] +} \ No newline at end of file diff --git a/browserify/index.d.ts b/browserify/index.d.ts index 506bc3dd86..8554025402 100644 --- a/browserify/index.d.ts +++ b/browserify/index.d.ts @@ -5,9 +5,10 @@ /// -declare var browserify: BrowserifyConstructor; +declare var browserify: browserify.BrowserifyConstructor; export = browserify; +declare namespace browserify { /** * Options pertaining to an individual file. */ @@ -173,3 +174,4 @@ interface BrowserifyObject extends NodeJS.EventEmitter { */ pipeline: any; } +} diff --git a/chai-dom/chai-dom.d.ts b/chai-dom/chai-dom.d.ts index 64cf97f516..4338de92e2 100644 --- a/chai-dom/chai-dom.d.ts +++ b/chai-dom/chai-dom.d.ts @@ -3,7 +3,7 @@ // Definitions by: Matt Lewis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Chai { @@ -24,13 +24,13 @@ declare namespace Chai { value(text: string): Assertion; } - + interface Include { - + text(text: string|string[]): Assertion; - + html(text: string|string[]): Assertion; - + } } diff --git a/chai-dom/tsconfig.json b/chai-dom/tsconfig.json new file mode 100644 index 0000000000..79855c3e09 --- /dev/null +++ b/chai-dom/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "chai-dom.d.ts", + "chai-dom-tests.ts" + ] +} \ No newline at end of file diff --git a/chai-enzyme/chai-enzyme-tests.tsx b/chai-enzyme/chai-enzyme-tests.tsx index f85320cee0..0e491a7ba7 100644 --- a/chai-enzyme/chai-enzyme-tests.tsx +++ b/chai-enzyme/chai-enzyme-tests.tsx @@ -1,7 +1,7 @@ -/// +/// /// -/// -/// +/// +/// import * as React from "react"; import * as chaiEnzyme from "chai-enzyme"; diff --git a/chai-enzyme/chai-enzyme.d.ts b/chai-enzyme/chai-enzyme.d.ts index 21e463dac5..72842332ad 100644 --- a/chai-enzyme/chai-enzyme.d.ts +++ b/chai-enzyme/chai-enzyme.d.ts @@ -4,12 +4,12 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +/// +/// +/// declare namespace Chai { - type EnzymeSelector = string | __React.StatelessComponent | __React.ComponentClass | { [key: string]: any }; + type EnzymeSelector = string | React.StatelessComponent | React.ComponentClass | { [key: string]: any }; interface Match { /** diff --git a/chai-enzyme/tsconfig.json b/chai-enzyme/tsconfig.json new file mode 100644 index 0000000000..81fa4a5105 --- /dev/null +++ b/chai-enzyme/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "chai-enzyme.d.ts", + "chai-enzyme-tests.tsx" + ] +} \ No newline at end of file diff --git a/commangular/commangular.d.ts b/commangular/commangular.d.ts index b03a22574e..06126ac64f 100644 --- a/commangular/commangular.d.ts +++ b/commangular/commangular.d.ts @@ -3,12 +3,12 @@ // Definitions by: Hiraash Thawfeek // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare var commangular: commangular.ICommAngularStatic; declare module commangular { - + /////////////////////////////////////////////////////////////////////////// // Commangular Static // see http://commangular.org/docs/#commangular-namespace @@ -19,78 +19,78 @@ declare module commangular { * Use this function to create and register a command with Commangular * * @param commandName It's the name of the command you are creating. It's useful to reference the command from the command provider. - * @param commandFunction It's the command class that will be executed when commangular runs this command. + * @param commandFunction It's the command class that will be executed when commangular runs this command. * It has to be something that implements ICommand. Same as angular syntax * @param commandConfig It's and object with paramaters to configure the command execution. */ create (commandName: string, commandFunction: Function, commandConfig?:ICommandConfig) : void; command (commandName: string, commandFunction: Function, commandConfig?:ICommandConfig) : void; - + /** * This function allows you to hijack the execution before or after and * execute some cross cutting functionality. * see http://commangular.org/docs/#command-aspects * @param aspectDescriptor The interceptor descriptor has two parts 'Where' and 'What'. * Where do you want to intercept? you've 5 options : - * - @Before : The interceptor will be executed before the command. You will be able to - * cancel the command or modify the data that will be injected in the command or do + * - @Before : The interceptor will be executed before the command. You will be able to + * cancel the command or modify the data that will be injected in the command or do * some other operation you need before the command execution. - * - @After : The interceptor will be executed just after the command and before any other next + * - @After : The interceptor will be executed just after the command and before any other next * command. You can get the lastResult from the command, cancel execution etc etc. - * - @AfterExecution : This intercetor is executed just after the command execute method and + * - @AfterExecution : This intercetor is executed just after the command execute method and * it can get the result from the command and update it before the onResult method is executed. - * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of + * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of * the command throws an exception. You can get the error throwed injected to do what you need. - * - @Around : The interceptor is executed around a command.That means that a especial - * object 'processor' will be injected in the interceptor and you can invoke the command + * - @Around : The interceptor is executed around a command.That means that a especial + * object 'processor' will be injected in the interceptor and you can invoke the command * or the next interceptor. It will be better explained below. * @param aspectFunction It's the command class execute function that will be run for the given aspect. - * @param order You can chain any number of interceptors to the same command, so if you need to executed + * @param order You can chain any number of interceptors to the same command, so if you need to executed * the interceptor in a specific order you can indicate it here. An order of 0 is assigned by default. */ aspect ( aspectDescriptor: string, aspectFunction: ICommand, order: number ) : void; - + /** - * Event aspects work the same way command aspects do, but they intercept all the command groups instead, - * so you can run some function before the command group starts it's execution , after or when any + * Event aspects work the same way command aspects do, but they intercept all the command groups instead, + * so you can run some function before the command group starts it's execution , after or when any * command or interceptor in the group throw an exception. * see http://commangular.org/docs/#event-aspects * @param aspectDescriptor The interceptor descriptor has two parts 'Where' and 'What'. * Where do you want to intercept? you've 3 options : - * - @Before : The interceptor will be executed before the command. You will be able to - * cancel the command or modify the data that will be injected in the command or do + * - @Before : The interceptor will be executed before the command. You will be able to + * cancel the command or modify the data that will be injected in the command or do * some other operation you need before the command execution. - * - @After : The interceptor will be executed just after the command and before any other next + * - @After : The interceptor will be executed just after the command and before any other next * command. You can get the lastResult from the command, cancel execution etc etc. - * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of + * - @AfterThrowing : This interceptor will be executed if the command or any interceptor of * the command throws an exception. You can get the error throwed injected to do what you need. * @param aspectFunction It's the command class execute function that will be run for the given aspect. - * @param order You can chain any number of interceptors to the same command, so if you need to executed + * @param order You can chain any number of interceptors to the same command, so if you need to executed * the interceptor in a specific order you can indicate it here. An order of 0 is assigned by default. */ eventAspect( aspectDescriptor: string, aspectFunction: ICommand, order: number ) : void; - + /** * TBD */ - resolver( commandName: string, resolverFunction : Function ) : void; - + resolver( commandName: string, resolverFunction : Function ) : void; + /** * Clears all commands and aspects registered with commangular. */ reset() : void; - + /** - * Can be used to enable/disable debug + * Can be used to enable/disable debug */ debug( enableDebug : boolean ) : void; - + /** * TBD */ build() : void; } - + /** * The command function/object * see http://commangular.org/docs/#commangular-namespace @@ -101,29 +101,29 @@ declare module commangular { * It can take parameters in as injected by angular */ execute() : any; - + } - + interface IResultCommand extends ICommand{ /** - * Is executed after the execute method and the interception chain and can receive + * Is executed after the execute method and the interception chain and can receive * the result from the execute method of the same command. - * + * * @param result Value/object returned by the execution. */ onResult ( result: any ) : void; - + /** * Is executed when the executed method ends with an error. Can receive the error throw by the execute method. * @param error The error that occured during execution */ onError ( error: Error ) : void; } - + /** * The result object expected in the promise returned by the dispatch function * This must be extended to add custom result keys - * see http://commangular.org/docs/#returning-result-from-commands + * see http://commangular.org/docs/#returning-result-from-commands */ interface ICommandResult { /** @@ -131,65 +131,65 @@ declare module commangular { */ lastResult : any; } - + /** * Command creation configuration * see http://commangular.org/docs/#the-command-config-object */ interface ICommandConfig { /** - * This property instruct commangular to keep the value returned by the command in the value - * key passed in 'resultKey'. It has to be a string. It means that after the execution of this + * This property instruct commangular to keep the value returned by the command in the value + * key passed in 'resultKey'. It has to be a string. It means that after the execution of this * commands you will be able to inject on the next command using that key and the result of the command will be injected. */ resultKey : string; } - + /** - * All the command configuration of your application is done in an angular config block and - * with the $commangularProvider. The provider is responsible to build the command strutures and - * map them to the desired event names. You can create multiple configs blocks in angular, so you + * All the command configuration of your application is done in an angular config block and + * with the $commangularProvider. The provider is responsible to build the command strutures and + * map them to the desired event names. You can create multiple configs blocks in angular, so you * can have multiple command config blocks to separate functional parts of your application. * see http://commangular.org/docs/#using-the-provider */ interface ICommAngularProvider { - + /** * This function lets you map a even name to a command sequence * @param eventName An event that will be watched by commangular */ mapTo( eventName: string ) : ICommAngularDescriptor; - + /** - * Used along with mapTo function. Creates a sequence of commands that + * Used along with mapTo function. Creates a sequence of commands that * execute after one and other * see http://commangular.org/docs/#building-command-sequences */ asSequence(): ICommAngularDescriptor; - + /** * Used along with mapTo function. Maps commands to be executed parallel * see http://commangular.org/docs/#building-parallel-commands */ asParallel(): ICommAngularDescriptor; - + /** - * A command flow is a decision point inside the command group.You can have any number + * A command flow is a decision point inside the command group.You can have any number * of flows inside a command group and nesting them how you perfer. * see http://commangular.org/docs/#building-command-flows */ - asFlow(): ICommAngularDescriptor; - + asFlow(): ICommAngularDescriptor; + findCommand( eventName: string ): ICommAngularDescriptor; - + } - + /** * The service that enables the execution of commands * see http://commangular.org/docs/#dispatching-events */ interface ICommAngularService { - + /** * This function executes the given command sequence. * see http://commangular.org/docs/#dispatching-events @@ -198,76 +198,76 @@ declare module commangular { */ dispatch( eventName: string, data?: any ) : ng.IPromise; } - + interface ICommAngularDescriptor { - + /** - * Used along with mapTo function. Creates a sequence of commands that + * Used along with mapTo function. Creates a sequence of commands that * execute after one and other * see http://commangular.org/docs/#building-command-sequences */ - asSequence (): ICommAngularDescriptor; + asSequence (): ICommAngularDescriptor; /** * Used along with mapTo function. Maps commands to be executed parallel * see http://commangular.org/docs/#building-parallel-commands */ asParallel(): ICommAngularDescriptor; - + /** - * A command flow is a decision point inside the command group.You can have any number + * A command flow is a decision point inside the command group.You can have any number * of flows inside a command group and nesting them how you perfer. * see http://commangular.org/docs/#building-command-flows */ - asFlow(): ICommAngularDescriptor; - + asFlow(): ICommAngularDescriptor; + /** * Add commands to a descriptor. * @param command The name that was used to create the command. */ add ( command: string ): ICommAngularDescriptor; - + /** * Add descriptor to a descriptor. * @param descriptor Another descriptor attached to a sequnce of commands. */ add ( descriptor: ICommAngularDescriptor ): ICommAngularDescriptor; - + /** - * This is to be used with flowing commands to attach an expression that + * This is to be used with flowing commands to attach an expression that * evaluates using Angular $parse. * see http://commangular.org/docs/#building-command-flows * @param expression A string form expression that can make use of services to validate conditions. * @param services A comma seperated list of services that are used in the above expression */ link ( expression: string, services?: string ): ICommAngularDescriptor; - + /** - * Works with the link function to attach a command to the flow if the - * expression becomes truthy. + * Works with the link function to attach a command to the flow if the + * expression becomes truthy. * see http://commangular.org/docs/#building-command-flows * @param command The name that was used to create the command. */ - to ( command: string ): ICommAngularDescriptor; + to ( command: string ): ICommAngularDescriptor; } - + } /** * Extending the angular rootScope to include the dispatch function in all scopes. */ declare module angular { - + interface IRootScopeService { - + /** * Commangular method to execute a command. * @param eventName Name of the even that will trigger a command sequence * @param data Data of any type that will be passed to the command. */ dispatch( eventName: string, data?: any ) : ng.IPromise; - + } - + } \ No newline at end of file diff --git a/commangular/tsconfig.json b/commangular/tsconfig.json new file mode 100644 index 0000000000..e52f7e1a12 --- /dev/null +++ b/commangular/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "commangular.d.ts", + "commangular-mock.d.ts" + ] +} \ No newline at end of file diff --git a/connect-redis/connect-redis-tests.ts b/connect-redis/connect-redis-tests.ts index abc14977ee..73e0e4d8f7 100644 --- a/connect-redis/connect-redis-tests.ts +++ b/connect-redis/connect-redis-tests.ts @@ -1,5 +1,5 @@ /// -/// +/// import * as connectRedis from "connect-redis"; import * as session from "express-session"; diff --git a/connect-redis/connect-redis.d.ts b/connect-redis/connect-redis.d.ts index b3a1529569..f66314a083 100644 --- a/connect-redis/connect-redis.d.ts +++ b/connect-redis/connect-redis.d.ts @@ -3,9 +3,9 @@ // Definitions by: Xavier Stouder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +/// +/// +/// declare module "connect-redis" { import * as express from "express"; diff --git a/connect-redis/tsconfig.json b/connect-redis/tsconfig.json new file mode 100644 index 0000000000..441b3c70c6 --- /dev/null +++ b/connect-redis/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "connect-redis.d.ts", + "connect-redis-tests.ts" + ] +} diff --git a/cordova-plugin-file-transfer/index.d.ts b/cordova-plugin-file-transfer/index.d.ts index 4644dddd42..ad8d9945f5 100644 --- a/cordova-plugin-file-transfer/index.d.ts +++ b/cordova-plugin-file-transfer/index.d.ts @@ -2,11 +2,11 @@ // Project: https://github.com/apache/cordova-plugin-file-transfer // Definitions by: Microsoft Open Technologies Inc. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// +// // Copyright (c) Microsoft Open Technologies Inc // Licensed under the MIT license -/// +/// /** * The FileTransfer object provides a way to upload files using an HTTP multi-part POST request, @@ -21,7 +21,7 @@ interface FileTransfer { * this can also be the full path of the file on the device. * @param server URL of the server to receive the file, as encoded by encodeURI(). * @param successCallback A callback that is passed a FileUploadResult object. - * @param errorCallback A callback that executes if an error occurs retrieving the FileUploadResult. + * @param errorCallback A callback that executes if an error occurs retrieving the FileUploadResult. * Invoked with a FileTransferError object. * @param options Optional parameters. * @param trustAllHosts Optional parameter, defaults to false. If set to true, it accepts all security certificates. diff --git a/cordova-plugin-file-transfer/tsconfig.json b/cordova-plugin-file-transfer/tsconfig.json index 0e88ebb590..a4d326b967 100644 --- a/cordova-plugin-file-transfer/tsconfig.json +++ b/cordova-plugin-file-transfer/tsconfig.json @@ -2,9 +2,15 @@ "compilerOptions": { "module": "commonjs", "target": "es6", - "noImplicitAny": false, + "noImplicitAny": true, "strictNullChecks": false, - "noEmit": true + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts", diff --git a/csv-parse/csv-parse.d.ts b/csv-parse/csv-parse.d.ts index 74184ca680..eb60d18fde 100644 --- a/csv-parse/csv-parse.d.ts +++ b/csv-parse/csv-parse.d.ts @@ -3,44 +3,44 @@ // Definitions by: David Muller // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "csv-parse/types" { interface callbackFn { (err: any, output: any): void } - + interface nameCallback { (line1: any[]): boolean | string[] - } - + } + interface options { /*** - * Set the field delimiter. One character only, defaults to comma. + * Set the field delimiter. One character only, defaults to comma. */ delimiter?: string; /*** * String used to delimit record rows or a special value; special constants are 'auto', 'unix', 'mac', 'windows', 'unicode'; defaults to 'auto' (discovered in source or 'unix' if no source is specified). - */ + */ rowDelimiter?: string; /*** - * Optional character surrounding a field, one character only, defaults to double quotes. + * Optional character surrounding a field, one character only, defaults to double quotes. */ quote?: string - + /*** - * Set the escape character, one character only, defaults to double quotes. - */ + * Set the escape character, one character only, defaults to double quotes. + */ escape?: string /*** - * List of fields as an array, a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, default to null, affect the result data set in the sense that records will be objects instead of arrays. + * List of fields as an array, a user defined callback accepting the first line and returning the column names or true if autodiscovered in the first CSV line, default to null, affect the result data set in the sense that records will be objects instead of arrays. */ columns?: any[]|boolean|nameCallback; /*** - * Treat all the characters after this one as a comment, default to '' (disabled). + * Treat all the characters after this one as a comment, default to '' (disabled). */ comment?: string @@ -88,24 +88,24 @@ declare module "csv-parse/types" { * If true, the parser will attempt to convert read data types to native types. */ auto_parse?: boolean - + /*** * If true, the parser will attempt to convert read data types to dates. It requires the "auto_parse" option. */ auto_parse_date?: boolean } - - import * as stream from "stream"; - + + import * as stream from "stream"; + interface Parser extends stream.Transform { __push(line: any): any ; - __write(chars: any, end: any, callback: any): any; + __write(chars: any, end: any, callback: any): any; } - + interface ParserConstructor { new (options: options): Parser; } - + interface parse { (input: string, options?: options, callback?: callbackFn): any; (options: options, callback: callbackFn): any; @@ -117,16 +117,16 @@ declare module "csv-parse/types" { declare module "csv-parse" { import { parse as parseIntf } from "csv-parse/types"; - + let parse: parseIntf; - + export = parse; } declare module "csv-parse/lib/sync" { - import { options } from "csv-parse/types"; - + import { options } from "csv-parse/types"; + function parse (input: string, options?: options): any; - + export = parse; } \ No newline at end of file diff --git a/csv-parse/tsconfig.json b/csv-parse/tsconfig.json new file mode 100644 index 0000000000..9e359a8737 --- /dev/null +++ b/csv-parse/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "csv-parse.d.ts", + "csv-parse-tests.ts" + ] +} \ No newline at end of file diff --git a/d3kit/d3kit-tests.ts b/d3kit/d3kit-tests.ts index 1b8d2a24f9..5eab2a4e79 100644 --- a/d3kit/d3kit-tests.ts +++ b/d3kit/d3kit-tests.ts @@ -1,7 +1,7 @@ /// -/// -/// -/// +/// +/// +/// /* jshint expr: true */ diff --git a/d3kit/d3kit.d.ts b/d3kit/d3kit.d.ts index 4e53472b7b..d5033d32df 100644 --- a/d3kit/d3kit.d.ts +++ b/d3kit/d3kit.d.ts @@ -3,7 +3,7 @@ // Definitions by: Morgan Benton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace d3kit { @@ -29,7 +29,7 @@ declare namespace d3kit { export class Skeleton { constructor(selector: string|Element, options?: ChartOptions, customEvents?: Array); - + // Getters getCustomEventNames(): Array; getDispatcher(): any; // should be d3.Dispatch but this throws error for user-created events @@ -78,9 +78,9 @@ declare namespace d3kit { export class Chartlet { constructor( - enterFunction?: ChartletEventFunction, - updateFunction?: ChartletEventFunction, - exitFunction?: ChartletEventFunction, + enterFunction?: ChartletEventFunction, + updateFunction?: ChartletEventFunction, + exitFunction?: ChartletEventFunction, customEventName?: Array); // Getter functions @@ -116,15 +116,15 @@ declare namespace d3kit { constructor(container: d3.Selection, tag?: string); - create(config: string|Array|LayerConfig|Array): d3.Selection|Array>; + create(config: string|Array|LayerConfig|Array|any): d3.Selection|Array>; get(name: string): d3.Selection; has(name: string): boolean; } export namespace factory { export function createChart( - defaultOptions: ChartOptions, - customEvents: Array, + defaultOptions: ChartOptions, + customEvents: Array, constructor: (skeleton: Skeleton) => void ): (selector: string|Element, options?: ChartOptions, customEvents?: Array) => Skeleton; } diff --git a/d3kit/tsconfig.json b/d3kit/tsconfig.json new file mode 100644 index 0000000000..67ab2f9e8c --- /dev/null +++ b/d3kit/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "d3kit.d.ts", + "d3kit-tests.ts" + ] +} \ No newline at end of file diff --git a/daterangepicker/daterangepicker-tests.ts b/daterangepicker/daterangepicker-tests.ts index ca1f99961c..0b8051b06a 100644 --- a/daterangepicker/daterangepicker-tests.ts +++ b/daterangepicker/daterangepicker-tests.ts @@ -1,4 +1,5 @@ /// +import moment = require("moment") function tests_simple() { $('#daterange').daterangepicker(); diff --git a/daterangepicker/daterangepicker.d.ts b/daterangepicker/daterangepicker.d.ts index a86614cfe8..88cce7c0a2 100644 --- a/daterangepicker/daterangepicker.d.ts +++ b/daterangepicker/daterangepicker.d.ts @@ -3,12 +3,14 @@ // Definitions by: SirMartin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +import moment = require("moment"); -interface JQuery { - daterangepicker(settings?: daterangepicker.Settings): JQuery; - daterangepicker(settings?: daterangepicker.Settings, callback?: (start?: string | Date | moment.Moment, end?: string | Date | moment.Moment, label?: string) => any): JQuery; +declare global { + interface JQuery { + daterangepicker(settings?: daterangepicker.Settings): JQuery; + daterangepicker(settings?: daterangepicker.Settings, callback?: (start?: string | Date | moment.Moment, end?: string | Date | moment.Moment, label?: string) => any): JQuery; + } } declare namespace daterangepicker { diff --git a/daterangepicker/package.json b/daterangepicker/package.json new file mode 100644 index 0000000000..992b24d513 --- /dev/null +++ b/daterangepicker/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "moment": "2.14.*" + } +} \ No newline at end of file diff --git a/daterangepicker/tsconfig.json b/daterangepicker/tsconfig.json new file mode 100644 index 0000000000..cbf48c5f61 --- /dev/null +++ b/daterangepicker/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "daterangepicker.d.ts", + "daterangepicker-tests.ts" + ] +} \ No newline at end of file diff --git a/df-visible/df-visible.d.ts b/df-visible/df-visible.d.ts index b8d05fe360..f7303a46ae 100644 --- a/df-visible/df-visible.d.ts +++ b/df-visible/df-visible.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andrey Lipatkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// type Direction = "horizontal" | "vertical" | "both"; diff --git a/df-visible/tsconfig.json b/df-visible/tsconfig.json new file mode 100644 index 0000000000..49c372fd65 --- /dev/null +++ b/df-visible/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "df-visible.d.ts", + "df-visible-tests.ts" + ] +} \ No newline at end of file diff --git a/dva/dva-tests.tsx b/dva/dva-tests.tsx index 917ee69e60..467be594ab 100644 --- a/dva/dva-tests.tsx +++ b/dva/dva-tests.tsx @@ -1,11 +1,7 @@ -/// -/// - -import React = __React; - import dva from 'dva'; import { connect } from 'dva'; import { Router, Route } from 'dva/router'; +import * as React from "react"; // 1. Initialize const app = dva(); @@ -25,9 +21,9 @@ app.model({ }); // 3. View -const App = connect(({ count }) => ({ +const App = connect(({ count }: any) => ({ count -}))(function ({ count, dispatch }) { +}))(function ({ count, dispatch }: any) { return (

{ count }

@@ -38,7 +34,7 @@ const App = connect(({ count }) => ({ }); // 4. Router -app.router(({ history }) => +app.router(({ history }: any) => diff --git a/dva/dva.d.ts b/dva/dva.d.ts index 0cf7206e63..7f7651c2f4 100644 --- a/dva/dva.d.ts +++ b/dva/dva.d.ts @@ -3,7 +3,7 @@ // Definitions by: nikogu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'dva' { /** connecting Container Components */ export function connect(maps:Object):Function; @@ -28,8 +28,6 @@ declare module 'dva' { * https://github.com/reactjs/react-router */ declare module 'dva/router' { - import React = __React; - interface RouterProps { history?: Object } diff --git a/dva/tsconfig.json b/dva/tsconfig.json new file mode 100644 index 0000000000..8c73ec457e --- /dev/null +++ b/dva/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "dva.d.ts", + "dva-tests.tsx" + ] +} \ No newline at end of file diff --git a/electron/index.d.ts b/electron/index.d.ts index 7d10fce465..cac4bab9b2 100644 --- a/electron/index.d.ts +++ b/electron/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: jedmao , rhysd , Milan Burda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Electron { diff --git a/epub/epub.d.ts b/epub/epub.d.ts index 7c813e003d..fe4f36ce87 100644 --- a/epub/epub.d.ts +++ b/epub/epub.d.ts @@ -3,7 +3,7 @@ // Definitions by: Julien Chaumond // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /** * new EPub(fname[, imageroot][, linkroot]) @@ -31,9 +31,9 @@ * /images/logo_img/OPT/logo.jpg **/ declare module "epub" { - + import {EventEmitter} from "events"; - + interface TocElement { level: number; order: number; @@ -41,26 +41,26 @@ declare module "epub" { id: string; href?: string; } - + class EPub extends EventEmitter { constructor(epubfile: string, imagewebroot?: string, chapterwebroot?: string); - + metadata: Object; manifest: Object; spine: Object; flow: Array; toc: Array; - + parse(): void; - + getChapter(chapterId: string, callback: (error: Error, text: string) => void): void; - + getChapterRaw(chapterId: string, callback: (error: Error, text: string) => void): void; - + getImage(id: string, callback: (error: Error, data: Buffer, mimeType: string) => void): void; - + getFile(id: string, callback: (error: Error, data: Buffer, mimeType: string) => void): void; } - + export = EPub; } diff --git a/epub/tsconfig.json b/epub/tsconfig.json new file mode 100644 index 0000000000..eda2b3868b --- /dev/null +++ b/epub/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "epub.d.ts", + "epub-tests.ts" + ] +} \ No newline at end of file diff --git a/eq.js/index.d.ts b/eq.js/index.d.ts index 5876649f3e..4f48c092d5 100644 --- a/eq.js/index.d.ts +++ b/eq.js/index.d.ts @@ -11,7 +11,7 @@ declare module 'eq.js' { } declare namespace eq { - type AvailableElementType = HTMLElement|HTMLElement[]|NodeList|JQuery; + type AvailableElementType = HTMLElement|HTMLCollectionOf|HTMLElement[]|NodeList|JQuery; interface EqjsStatic { diff --git a/eq.js/tsconfig.json b/eq.js/tsconfig.json index 79b9eb6b27..60aa90fe0c 100644 --- a/eq.js/tsconfig.json +++ b/eq.js/tsconfig.json @@ -13,6 +13,7 @@ "forceConsistentCasingInFileNames": true }, "files": [ - "index.d.ts" + "index.d.ts", + "eq.js.tests.ts" ] } \ No newline at end of file diff --git a/esprima-walk/esprima-walk-tests.ts b/esprima-walk/esprima-walk-tests.ts index 4588ebb615..31ec3b91e0 100644 --- a/esprima-walk/esprima-walk-tests.ts +++ b/esprima-walk/esprima-walk-tests.ts @@ -1,7 +1,5 @@ -/// -/// - -import * as walk from 'esprima-walk' +import * as ESTree from "estree"; +import walk = require("esprima-walk"); var program: ESTree.Program var string: string diff --git a/esprima-walk/esprima-walk.d.ts b/esprima-walk/esprima-walk.d.ts deleted file mode 100644 index d18cf96bb1..0000000000 --- a/esprima-walk/esprima-walk.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Type definitions for esprima-walk v0.1.0 -// Project: https://github.com/jrajav/esprima-walk -// Definitions by: tswaters -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module "esprima-walk" { - - interface NodeWithParent extends ESTree.Node { - parent?: ESTree.Node - } - - /** - * Walk the provided AST; fn is called once for each node with a `type` - * @param {ESTree.Program} ast program to walk - * @param {function} fn function invoked for each node with type - */ - function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void - - namespace walk { - /** - * Walk the provided AST; fn is called once for each node with a `type` - * @param {ESTree.Program} ast program to walk - * @param {function} fn function invoked for each node - */ - export function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void - - /** - * Walk the provided AST; fn is called once for each node with a `type`. - * Adds a parent property prior to invoking fn when applicable - * @param {ESTree.Program} ast program to walk - * @param {function} fn function invoked for each node - */ - export function walkAddParent (ast: ESTree.Program, fn:(node: NodeWithParent)=>void) :void - } - - export = walk -} - diff --git a/esprima-walk/index.d.ts b/esprima-walk/index.d.ts new file mode 100644 index 0000000000..c79675df6d --- /dev/null +++ b/esprima-walk/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for esprima-walk v0.1.0 +// Project: https://github.com/jrajav/esprima-walk +// Definitions by: tswaters +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as ESTree from "estree"; + +type NodeWithParent = ESTree.Node & { parent?: ESTree.Node }; + +/** + * Walk the provided AST; fn is called once for each node with a `type` + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node with type + */ +declare function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void + +declare namespace walk { + /** + * Walk the provided AST; fn is called once for each node with a `type` + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node + */ + export function walk (ast: ESTree.Program, fn:(node: ESTree.Node)=>void) :void + + /** + * Walk the provided AST; fn is called once for each node with a `type`. + * Adds a parent property prior to invoking fn when applicable + * @param {ESTree.Program} ast program to walk + * @param {function} fn function invoked for each node + */ + export function walkAddParent (ast: ESTree.Program, fn:(node: NodeWithParent)=>void) :void +} + +export = walk diff --git a/esprima-walk/tsconfig.json b/esprima-walk/tsconfig.json new file mode 100644 index 0000000000..53ed459f2d --- /dev/null +++ b/esprima-walk/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "esprima-walk-tests.ts" + ] +} \ No newline at end of file diff --git a/exorcist/exorcist.d.ts b/exorcist/exorcist.d.ts index a60908915b..93c11cd23d 100644 --- a/exorcist/exorcist.d.ts +++ b/exorcist/exorcist.d.ts @@ -3,7 +3,7 @@ // Definitions by: TeamworkGuy2 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'exorcist' { import through = require("through"); diff --git a/exorcist/tsconfig.json b/exorcist/tsconfig.json new file mode 100644 index 0000000000..e0ca3628a8 --- /dev/null +++ b/exorcist/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "exorcist.d.ts", + "exorcist-tests.ts" + ] +} \ No newline at end of file diff --git a/express-domain-middleware/express-domain-middleware.d.ts b/express-domain-middleware/express-domain-middleware.d.ts index 1710d548e0..935f315dd4 100644 --- a/express-domain-middleware/express-domain-middleware.d.ts +++ b/express-domain-middleware/express-domain-middleware.d.ts @@ -3,7 +3,7 @@ // Definitions by: Hookclaw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "express-domain-middleware" { import express = require('express'); diff --git a/express-domain-middleware/tsconfig.json b/express-domain-middleware/tsconfig.json new file mode 100644 index 0000000000..456e26404a --- /dev/null +++ b/express-domain-middleware/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "express-domain-middleware.d.ts", + "express-domain-middleware-tests.ts" + ] +} \ No newline at end of file diff --git a/file-type/file-type-tests.ts b/file-type/file-type-tests.ts index ebbee83783..1ce0bf6bdf 100644 --- a/file-type/file-type-tests.ts +++ b/file-type/file-type-tests.ts @@ -1,5 +1,3 @@ -/// - "use strict"; import fileType = require("file-type") diff --git a/file-type/file-type.d.ts b/file-type/index.d.ts similarity index 51% rename from file-type/file-type.d.ts rename to file-type/index.d.ts index 58c449ca3c..a1bc0d8466 100644 --- a/file-type/file-type.d.ts +++ b/file-type/index.d.ts @@ -3,15 +3,13 @@ // Definitions by: KIM Jaesuck a.k.a. gim tcaesvk // Definitions: https://github.com/DefinitelyType/DefinitelyTyped -/// +/// -declare module "file-type" { - interface FileTypeResult { - ext: string - mime: string - } - - function FileType(buf: Buffer): FileTypeResult - - export = FileType +interface FileTypeResult { + ext: string + mime: string } + +declare function FileType(buf: Buffer): FileTypeResult + +export = FileType diff --git a/file-type/tsconfig.json b/file-type/tsconfig.json new file mode 100644 index 0000000000..52468981c7 --- /dev/null +++ b/file-type/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "file-type-tests.ts" + ] +} \ No newline at end of file diff --git a/fill-pdf/fill-pdf.d.ts b/fill-pdf/fill-pdf.d.ts index d35057f934..94adba6e75 100644 --- a/fill-pdf/fill-pdf.d.ts +++ b/fill-pdf/fill-pdf.d.ts @@ -3,7 +3,7 @@ // Definitions by: Seth Westphal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'fill-pdf' { diff --git a/fill-pdf/tsconfig.json b/fill-pdf/tsconfig.json new file mode 100644 index 0000000000..51c99ab9de --- /dev/null +++ b/fill-pdf/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "fill-pdf.d.ts", + "fill-pdf-tests.ts" + ] +} \ No newline at end of file diff --git a/fluent-ffmpeg/fluent-ffmpeg.d.ts b/fluent-ffmpeg/fluent-ffmpeg.d.ts index 92e1a33891..538ac71761 100644 --- a/fluent-ffmpeg/fluent-ffmpeg.d.ts +++ b/fluent-ffmpeg/fluent-ffmpeg.d.ts @@ -3,7 +3,7 @@ // Definitions by: KIM Jaesuck a.k.a. gim tcaesvk // Definitions: https://github.com/DefinitelyType/DefinitelyTyped -/// +/// declare module "fluent-ffmpeg" { import * as events from "events" diff --git a/fluent-ffmpeg/tsconfig.json b/fluent-ffmpeg/tsconfig.json new file mode 100644 index 0000000000..3e2fd3a624 --- /dev/null +++ b/fluent-ffmpeg/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "fluent-ffmpeg.d.ts", + "fluent-ffmpeg-tests.ts" + ] +} \ No newline at end of file diff --git a/fullpage.js/fullpage.js.d.ts b/fullpage.js/fullpage.js.d.ts index b2bedc62d9..7716a3bca8 100644 --- a/fullpage.js/fullpage.js.d.ts +++ b/fullpage.js/fullpage.js.d.ts @@ -3,215 +3,215 @@ // Definitions by: Andrew Roberts // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// interface FullPageJsOptions { /** * (default false) A selector can be used to specify the menu to link with the sections. This way the scrolling of the sections will activate the corresponding element in the menu using the class active. This won't generate a menu but will just add the active class to the element in the given menu with the corresponding anchor links. In order to link the elements of the menu with the sections, an HTML 5 data-tag (data-menuanchor) will be needed to use with the same anchor links as used within the sections. */ menu?: string; - + /** * (default false). Determines whether anchors in the URL will have any effect at all in the plugin. You can still using anchors internally for your own functions and callbacks, but they won't have any effect in the scrolling of the site. Useful if you want to combine fullPage.js with other plugins using anchor in the URL. */ lockAnchors?: boolean; - + /** * (default []) Defines the anchor links (#example) to be shown on the URL for each section. Anchors value should be unique. The position of the anchors in the array will define to which sections the anchor is applied. (second position for second section and so on). Using anchors forward and backward navigation will also be possible through the browser. This option also allows users to bookmark a specific section or slide. Be careful! anchors can not have the same value as any ID element on the site (or NAME element for IE). Now anchors can be defined directly in the HTML structure by using the attribute data-anchor as explained here. */ anchors?: string[]; - + /** * (default false) If set to true, it will show a navigation bar made up of small circles. */ navigation?: boolean; - + /** * (default none) It can be set to left or right and defines which position the navigation bar will be shown (if using one). */ navigationPosition?: string; - + /** * (default []) Defines the tooltips to show for the navigation circles in case they are being used. Example: navigationTooltips: ['firstSlide', 'secondSlide']. */ navigationTooltips?: string[]; - + /** * (default false) Shows a persistent tooltip for the actively viewed section in the vertical navigation. */ showActiveTooltip?: boolean; - + /** * (default false) If set to true it will show a navigation bar made up of small circles for each landscape slider on the site. */ slidesNavigation?: boolean; - + /** * (default bottom) Defines the position for the landscape navigation bar for sliders. Admits top and bottom as values. You may want to modify the CSS styles to determine the distance from the top or bottom as well as any other style such as color. */ slidesNavPosition?: string; - // Scrolling - + // Scrolling + /** * (default true). Defines whether to use JavaScript or CSS3 transforms to scroll within sections and slides. Useful to speed up the movement in tablet and mobile devices with browsers supporting CSS3. If this option is set to true and the browser doesn't support CSS3, a jQuery fallback will be used instead. */ css3?: boolean; - + /** * (default 700) Speed in milliseconds for the scrolling transitions. */ scrollingSpeed?: number; - + /** * (default true) Defines whether to use the "automatic" scrolling or the "normal" one. It also has affects the way the sections fit in the browser/device window in tablets and mobile phones. */ autoScrolling?: boolean; - + /** * (default true). Determines whether or not to fit sections to the viewport or not. When set to true the current active section will always fill the whole viewport. Otherwise the user will be free to stop in the middle of a section (when ) */ fitToSection?: boolean; - + /** * (default 1000). If fitToSection is set to true, this delays the fitting by the configured milliseconds. */ fitToSectionDelay?: number; - + /** * (default false). Determines whether to use scrollbar for the site or not. In case of using scroll bar, the autoScrolling functionality will still working as expected. The user will also be free to scroll the site with the scroll bar and fullPage.js will fit the section in the screen when scrolling finishes. */ scrollBar?: boolean; - + /** * (default easeInOutCubic) Defines the transition effect to use for the vertical and horizontal scrolling. It requires the file vendors/jquery.easings.min.js or jQuery UI for using some of its transitions. Other libraries could be used instead. */ easing?: string; - + /** * (default ease) Defines the transition effect to use in case of using css3:true. You can use the pre-defined ones (such as linear, ease-out...) or create your own ones using the cubic-bezier function. You might want to use Matthew Lein CSS Easing Animation Tool for it. */ easingcss3?: string; - + /** * (default false) Defines whether scrolling down in the last section should scroll to the first one or not. */ loopBottom?: boolean; - + /** * (default false) Defines whether scrolling up in the first section should scroll to the last one or not. */ loopTop?: boolean; - + /** * (default true) Defines whether horizontal sliders will loop after reaching the last or previous slide or not. */ loopHorizontal?: boolean; - + /** * (default false) Defines whether scrolling down in the last section should scroll down to the first one or not, and if scrolling up in the first section should scroll up to the last one or not. Not compatible with loopTop or loopBottom. */ continuousVertical?: boolean; - + /** * (default null) If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the jQuery selectors for those elements. (For example: normalScrollElements: '#element1, .element2') */ normalScrollElements?: string; - + /** * (default false) defines whether or not to create a scroll for the section/slide in case its content is bigger than the height of it. When set to true, your content will be wrapped by the plugin. Consider using delegation or load your other scripts in the afterRender callback. In case of setting it to true, it requires the vendor library scrolloverflow.min.js and it should be loaded before the fullPage.js plugin. */ scrollOverflow?: boolean; - + /** * when using scrollOverflow:true fullpage.js will make use of a forked and modified version of iScroll.js libary. You can customize the scrolling behaviour by providing fullpage.js with the iScroll.js options you want to use. Check its documentation for more info. */ scrollOverflowOptions?: any; - + /** * (default 5) Defines a percentage of the browsers window width/height, and how far a swipe must measure for navigating to the next section / slide */ touchSensitivity?: number; - + /** * (default 5) Defines the threshold for the number of hops up the html node tree Fullpage will test to see if normalScrollElements is a match to allow scrolling functionality on divs on a touch device. (For example: normalScrollElementTouchThreshold: 3) */ normalScrollElementTouchThreshold?: number; // Accessibility - + /** * (default true) Defines if the content can be navigated using the keyboard */ keyboardScrolling?: boolean; - + /** * (default true) Defines whether the load of the site when given an anchor (#) will scroll with animation to its destination or will directly load on the given section. */ animateAnchor?: boolean; - + /** * (default true) Defines whether to push the state of the site to the browser's history. When set to true each section/slide of the site will act as a new page and the back and forward buttons of the browser will scroll the sections/slides to reach the previous or next state of the site. When set to false, the URL will keep changing but will have no effect ont he browser's history. This option is automatically turned off when using autoScrolling:false. */ recordHistory?: boolean; - // Design + // Design /** * (default: true) Determines whether to use control arrows for the slides to move right or left. */ controlArrows?: boolean; - + /** * (default true) Vertically centering of the content within sections. When set to true, your content will be wrapped by the plugin. Consider using delegation or load your other scripts in the afterRender callback. */ verticalCentered?: boolean; - - + + resize ?: boolean; - + /** * (default none) Define the CSS background-color property for each section */ sectionsColor ?: string[]; - + /** * (default 0) Defines the top padding for each section with a numerical value and its measure (paddingTop: '10px', paddingTop: '10em'...) Useful in case of using a fixed header. */ paddingTop?: string; - + /** * (default 0) Defines the bottom padding for each section with a numerical value and its measure (paddingBottom: '10px', paddingBottom: '10em'...). Useful in case of using a fixed footer. */ paddingBottom?: string; - + /** * (default null) Defines which elements will be taken off the scrolling structure of the plugin which is necessary when using the css3 option to keep them fixed. It requires a string with the jQuery selectors for those elements. (For example: fixedElements: '#element1, .element2') */ fixedElements?: string; - + /** * (default 0) A normal scroll (autoScrolling:false) will be used under the defined width in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's width is less than 900 the plugin will scroll like a normal site. */ responsiveWidth?: number; - + /** * (default 0) A normal scroll (autoScrolling:false) will be used under the defined height in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's height is less than 900 the plugin will scroll like a normal site. */ responsiveHeight?: number; // Custom selectors - + /** * (default .section) Defines the jQuery selector used for the plugin sections. It might need to be changed sometimes to avoid problem with other plugins using the same selectors as fullpage.js. */ sectionSelector?: string; - + /** * (default .slide) Defines the jQuery selector used for the plugin slides. It might need to be changed sometimes to avoid problem with other plugins using the same selectors as fullpage.js. */ slideSelector?: string; - // Events + // Events /** * This callback is fired once the user leaves a section, in the transition to the new section. Returning false will cancel the move before it takes place. * @param index index of the leaving section. Starting from 1. @@ -219,29 +219,29 @@ interface FullPageJsOptions { * @param direction it will take the values up or down depending on the scrolling direction. */ onLeave?: (index: number, nextIndex: number, direction: string) => void; - + /** * Callback fired once the sections have been loaded, after the scrolling has ended. * @param anchorLink anchorLink corresponding to the section. * @param index index of the section. Starting from 1. */ afterLoad?: (anchorLink: string, index: number) => void; - + /** * This callback is fired just after the structure of the page is generated. This is the callback you want to use to initialize other plugins or fire any code which requires the document to be ready (as this plugin modifies the DOM to create the resulting structure). */ afterRender?: () => void; - + /** * This callback is fired after resizing the browser's window. Just after the sections are resized. */ afterResize?: () => void; - + /** * Callback fired once the slide of a section have been loaded, after the scrolling has ended. - * + * * In case of not having anchorLinks defined for the slide or slides the slideIndex parameter would be the only one to use. - * + * * Parameters: * * @param anchorLink anchorLink corresponding to the section. @@ -250,7 +250,7 @@ interface FullPageJsOptions { * @param slideIndex index of the slide. Starting from 1. (the default slide doesn't count as slide, but as a section) */ afterSlideLoad?: (anchorLink: string, index: number, slideAnchor: string, slideIndex: number) => void; - + /** * This callback is fired once the user leaves an slide to go to another, in the transition to the new slide. Returning false will cancel the move before it takes place. * @param anchorLink: anchorLink corresponding to the section. diff --git a/fullpage.js/tsconfig.json b/fullpage.js/tsconfig.json new file mode 100644 index 0000000000..0e6588b0f4 --- /dev/null +++ b/fullpage.js/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "fullpage.js.d.ts", + "fullpage.js-tests.ts" + ] +} \ No newline at end of file diff --git a/geojson2osm/geojson2osm-tests.ts b/geojson2osm/geojson2osm-tests.ts index c7bfc05b85..887f10a83c 100644 --- a/geojson2osm/geojson2osm-tests.ts +++ b/geojson2osm/geojson2osm-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import { geojson2osm } from 'geojson2osm' const features: GeoJSON.FeatureCollection = { diff --git a/geojson2osm/geojson2osm.d.ts b/geojson2osm/geojson2osm.d.ts deleted file mode 100644 index 58393411f1..0000000000 --- a/geojson2osm/geojson2osm.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Type definitions for geojson2osm 0.0.5 -// Project: https://github.com/Rub21/geojson2osm -// Definitions by: Denis Carriere -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module 'geojson2osm' { - /** - * Converts GeoJSON features to OpenStreetMap XML. - * @param features Input features - * @returns OpenStreetMap XML - */ - export function geojson2osm(features: GeoJSON.Feature | GeoJSON.FeatureCollection): any -} diff --git a/geojson2osm/index.d.ts b/geojson2osm/index.d.ts new file mode 100644 index 0000000000..08bc529cc0 --- /dev/null +++ b/geojson2osm/index.d.ts @@ -0,0 +1,13 @@ +// Type definitions for geojson2osm 0.0.5 +// Project: https://github.com/Rub21/geojson2osm +// Definitions by: Denis Carriere +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/** + * Converts GeoJSON features to OpenStreetMap XML. + * @param features Input features + * @returns OpenStreetMap XML + */ +export function geojson2osm(features: GeoJSON.Feature | GeoJSON.FeatureCollection): any diff --git a/geojson2osm/tsconfig.json b/geojson2osm/tsconfig.json new file mode 100644 index 0000000000..310959268e --- /dev/null +++ b/geojson2osm/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "geojson2osm-tests.ts" + ] +} \ No newline at end of file diff --git a/globalize-compiler/globalize-compiler-tests.ts b/globalize-compiler/globalize-compiler-tests.ts index f4fc934d1f..648ed40032 100644 --- a/globalize-compiler/globalize-compiler-tests.ts +++ b/globalize-compiler/globalize-compiler-tests.ts @@ -1,12 +1,11 @@ -/// - -import globalizeCompiler = require("globalize-compiler"); +import * as ESTree from "estree"; +import * as globalizeCompiler from "globalize-compiler"; const globalize: GlobalizeStatic = null; -let extractsArray: GlobalizeCompiler.FormatterOrParserFunction[]; +let extractsArray: globalizeCompiler.FormatterOrParserFunction[]; -const templateFunction: (options: GlobalizeCompiler.CompileTemplateOptions) => string = - (options: GlobalizeCompiler.CompileTemplateOptions): string => { +const templateFunction: (options: globalizeCompiler.CompileTemplateOptions) => string = + (options: globalizeCompiler.CompileTemplateOptions): string => { const deps: string[] = options.dependencies; const code: string = options.code; return `${deps.join(';')}${code}`; @@ -18,7 +17,7 @@ compileOutput = globalizeCompiler.compile({ x: () => "test", y: (x: string) => x compileOutput = globalizeCompiler.compile(extractsArray, { template: templateFunction }); compileOutput = globalizeCompiler.compile({ x: () => "test", y: (x: string) => x }, { template: templateFunction }); -let extractOutput: GlobalizeCompiler.ExtractFunction; +let extractOutput: globalizeCompiler.ExtractFunction; extractOutput = globalizeCompiler.extract("path"); const ast: ESTree.Program = undefined; diff --git a/globalize-compiler/globalize-compiler.d.ts b/globalize-compiler/globalize-compiler.d.ts deleted file mode 100644 index 3959924412..0000000000 --- a/globalize-compiler/globalize-compiler.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -// Type definitions for globalize-compiler v0.2.0 -// Project: https://github.com/jquery-support/globalize-compiler -// Definitions by: Ian Clanton-Thuon -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// - -declare namespace GlobalizeCompiler { - interface CompileTemplateOptions { - /** - * the source of the compiled formatters and parsers. - */ - code: string; - - /** - * a list of globalize runtime modules that the compiled code depends on, e.g. globalize-runtime/number. - */ - dependencies: string[]; - } - - interface CompileOptions { - /** - * A function that replaces the default template. - */ - template?: (options: CompileTemplateOptions) => string; - } - - interface FormatterOrParserFunction { - (...arguments: any[]): any; - } - - interface ExtractFunction { - /** - * @param {globalize} the globalize object. - * - * @returns an Array with the formatters and parsers created using the passed Globalize. - */ - (globalize: GlobalizeStatic): FormatterOrParserFunction[]; - } - - interface CompileExtractsAttributes extends CompileOptions { - /** - * an Array of extracts obtained by @see{GlobalizeCompilerStatic.extract} - */ - extracts: ExtractFunction; - - /** - * a locale to be used as Globalize.locale(defaultLocale) when generating the extracted formatters and parsers. - */ - defaultLocale: string; - - /** - * an Object with CLDR data (in the JSON format) or a Function taking one argument: locale, a String; returning - * an Object with the CLDR data for the passed locale. Defaults to the entire supplemental data plus the entire - * main data for the defaultLocale. - */ - cldr?: Object | ((locale: string) => Object); - - /** - * an Object with messages data (in the JSON format) or a Function taking one argument: locale, a String; returning - * an Object with the messages data for the passed locale. Defaults to {}. - */ - messages?: Object | ((locale: string) => Object); - } - - interface GlobalizeCompilerStatic { - /** - * Generates a JavaScript bundle containing the specified globalize formatters and parsers. - * - * @param {formattersAndParsers} an Array or an Object containing formatters and/or parsers. - * @param {options} compiler options. - * - * @returns a String with the generated JavaScript bundle (UMD wrapped) including the compiled formatters and - * parsers. - */ - compile(formattersAndParsers: FormatterOrParserFunction[] | { [key: string]: FormatterOrParserFunction }, - options?: CompileOptions): string; - - /** - * Creates an extract function from a source file. - * - * @param {input} a String with a filename, or a String with the file content, or an AST Object. - * - * @returns an extract. An extract is a Function taking one argument: Globalize, the Globalize Object; - * and returning an Array with the formatters and parsers created using the passed Globalize. - */ - extract(input: string | ESTree.Program): ExtractFunction; - - /** - * Generates a JavaScript bundle containing the specified globalize formatters and parsers. - * - * @param {options} compiler attributes. - * - * @returns a String with the generated JavaScript bundle (UMD wrapped) including the compiled formatters and - * parsers. - */ - compileExtracts(attributes: CompileExtractsAttributes): string; - } -} - -declare module "globalize-compiler" { - var globalizeCompiler: GlobalizeCompiler.GlobalizeCompilerStatic; - - export = globalizeCompiler; -} diff --git a/globalize-compiler/index.d.ts b/globalize-compiler/index.d.ts new file mode 100644 index 0000000000..6f3874636a --- /dev/null +++ b/globalize-compiler/index.d.ts @@ -0,0 +1,96 @@ +// Type definitions for globalize-compiler v0.2.0 +// Project: https://github.com/jquery-support/globalize-compiler +// Definitions by: Ian Clanton-Thuon +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// +import * as ESTree from "estree"; + +interface CompileTemplateOptions { + /** + * the source of the compiled formatters and parsers. + */ + code: string; + + /** + * a list of globalize runtime modules that the compiled code depends on, e.g. globalize-runtime/number. + */ + dependencies: string[]; +} + +interface CompileOptions { + /** + * A function that replaces the default template. + */ + template?: (options: CompileTemplateOptions) => string; +} + +interface FormatterOrParserFunction { + (...args: any[]): any; +} + +interface ExtractFunction { + /** + * @param {globalize} the globalize object. + * + * @returns an Array with the formatters and parsers created using the passed Globalize. + */ + (globalize: GlobalizeStatic): FormatterOrParserFunction[]; +} + +interface CompileExtractsAttributes extends CompileOptions { + /** + * an Array of extracts obtained by @see{GlobalizeCompilerStatic.extract} + */ + extracts: ExtractFunction; + + /** + * a locale to be used as Globalize.locale(defaultLocale) when generating the extracted formatters and parsers. + */ + defaultLocale: string; + + /** + * an Object with CLDR data (in the JSON format) or a Function taking one argument: locale, a String; returning + * an Object with the CLDR data for the passed locale. Defaults to the entire supplemental data plus the entire + * main data for the defaultLocale. + */ + cldr?: Object | ((locale: string) => Object); + + /** + * an Object with messages data (in the JSON format) or a Function taking one argument: locale, a String; returning + * an Object with the messages data for the passed locale. Defaults to {}. + */ + messages?: Object | ((locale: string) => Object); +} + +/** + * Generates a JavaScript bundle containing the specified globalize formatters and parsers. + * + * @param {formattersAndParsers} an Array or an Object containing formatters and/or parsers. + * @param {options} compiler options. + * + * @returns a String with the generated JavaScript bundle (UMD wrapped) including the compiled formatters and + * parsers. + */ +export function compile(formattersAndParsers: FormatterOrParserFunction[] | { [key: string]: FormatterOrParserFunction }, + options?: CompileOptions): string; + +/** + * Creates an extract function from a source file. + * + * @param {input} a String with a filename, or a String with the file content, or an AST Object. + * + * @returns an extract. An extract is a Function taking one argument: Globalize, the Globalize Object; + * and returning an Array with the formatters and parsers created using the passed Globalize. + */ +export function extract(input: string | ESTree.Program): ExtractFunction; + +/** + * Generates a JavaScript bundle containing the specified globalize formatters and parsers. + * + * @param {options} compiler attributes. + * + * @returns a String with the generated JavaScript bundle (UMD wrapped) including the compiled formatters and + * parsers. + */ +export function compileExtracts(attributes: CompileExtractsAttributes): string; diff --git a/globalize-compiler/tsconfig.json b/globalize-compiler/tsconfig.json new file mode 100644 index 0000000000..87dae3c759 --- /dev/null +++ b/globalize-compiler/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "globalize-compiler-tests.ts" + ] +} \ No newline at end of file diff --git a/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts b/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts index fd7a053ce6..559dd4f609 100644 --- a/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts +++ b/gulp-angular-templatecache/gulp-angular-templatecache-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as gulp from 'gulp'; import * as templateCache from 'gulp-angular-templatecache'; diff --git a/gulp-angular-templatecache/gulp-angular-templatecache.d.ts b/gulp-angular-templatecache/gulp-angular-templatecache.d.ts index 34e52acc36..ac608c39a6 100644 --- a/gulp-angular-templatecache/gulp-angular-templatecache.d.ts +++ b/gulp-angular-templatecache/gulp-angular-templatecache.d.ts @@ -3,7 +3,7 @@ // Definitions by: Aman Mahajan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "gulp-angular-templatecache" { function templatecache(): NodeJS.ReadWriteStream; diff --git a/gulp-angular-templatecache/tsconfig.json b/gulp-angular-templatecache/tsconfig.json new file mode 100644 index 0000000000..6b3a7a2fa2 --- /dev/null +++ b/gulp-angular-templatecache/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "gulp-angular-templatecache.d.ts", + "gulp-angular-templatecache-tests.ts" + ] +} \ No newline at end of file diff --git a/gulp-help-doc/gulp-help-doc-tests.ts b/gulp-help-doc/gulp-help-doc-tests.ts index f06c25e55c..4e5d2117aa 100644 --- a/gulp-help-doc/gulp-help-doc-tests.ts +++ b/gulp-help-doc/gulp-help-doc-tests.ts @@ -1,7 +1,3 @@ -/// -/// -/// - import gulp = require('gulp'); import usage = require('gulp-help-doc'); diff --git a/gulp-help-doc/gulp-help-doc.d.ts b/gulp-help-doc/gulp-help-doc.d.ts index 80d4922774..22bf5b4b5f 100644 --- a/gulp-help-doc/gulp-help-doc.d.ts +++ b/gulp-help-doc/gulp-help-doc.d.ts @@ -3,8 +3,8 @@ // Definitions by: Mikhus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "gulp-help-doc" { diff --git a/gulp-help-doc/tsconfig.json b/gulp-help-doc/tsconfig.json new file mode 100644 index 0000000000..f7206b7785 --- /dev/null +++ b/gulp-help-doc/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "gulp-help-doc.d.ts", + "gulp-help-doc-tests.ts" + ] +} \ No newline at end of file diff --git a/gulp-insert/gulp-insert-tests.ts b/gulp-insert/gulp-insert-tests.ts index e420cf5e4a..d3c84ecce5 100644 --- a/gulp-insert/gulp-insert-tests.ts +++ b/gulp-insert/gulp-insert-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as gulp from 'gulp'; import * as insert from 'gulp-insert'; diff --git a/gulp-insert/gulp-insert.d.ts b/gulp-insert/gulp-insert.d.ts index 9777280d5b..3ade4e803e 100644 --- a/gulp-insert/gulp-insert.d.ts +++ b/gulp-insert/gulp-insert.d.ts @@ -3,8 +3,8 @@ // Definitions by: Shant Marouti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module 'gulp-insert' { diff --git a/gulp-insert/tsconfig.json b/gulp-insert/tsconfig.json new file mode 100644 index 0000000000..109f4aaa90 --- /dev/null +++ b/gulp-insert/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "gulp-insert.d.ts", + "gulp-insert-tests.ts" + ] +} \ No newline at end of file diff --git a/gulp/index.d.ts b/gulp/index.d.ts index 0387e0962f..ac4888043b 100644 --- a/gulp/index.d.ts +++ b/gulp/index.d.ts @@ -8,6 +8,7 @@ import Orchestrator = require("orchestrator"); +import VinylFile = require("vinyl"); declare namespace gulp { interface Gulp extends Orchestrator { diff --git a/html-pdf/html-pdf-tests.ts b/html-pdf/html-pdf-tests.ts index 6a214ef231..f6a5ad6e1b 100644 --- a/html-pdf/html-pdf-tests.ts +++ b/html-pdf/html-pdf-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as fs from 'fs'; import * as pdf from 'html-pdf'; diff --git a/html-pdf/html-pdf.d.ts b/html-pdf/html-pdf.d.ts index 07c4be9f71..a75ac3fd1f 100644 --- a/html-pdf/html-pdf.d.ts +++ b/html-pdf/html-pdf.d.ts @@ -3,7 +3,7 @@ // Definitions by: Seth Westphal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'html-pdf' { diff --git a/html-pdf/tsconfig.json b/html-pdf/tsconfig.json new file mode 100644 index 0000000000..b3b3941f12 --- /dev/null +++ b/html-pdf/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "html-pdf.d.ts", + "html-pdf-tests.ts" + ] +} \ No newline at end of file diff --git a/html-webpack-plugin/html-webpack-plugin.d.ts b/html-webpack-plugin/html-webpack-plugin.d.ts index 59917abf62..17f1023c68 100644 --- a/html-webpack-plugin/html-webpack-plugin.d.ts +++ b/html-webpack-plugin/html-webpack-plugin.d.ts @@ -3,7 +3,7 @@ // Definitions by: Simon Hartcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "html-webpack-plugin" { import {Plugin} from "webpack"; diff --git a/html-webpack-plugin/tsconfig.json b/html-webpack-plugin/tsconfig.json new file mode 100644 index 0000000000..ea542ae271 --- /dev/null +++ b/html-webpack-plugin/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "html-webpack-plugin.d.ts", + "html-webpack-plugin-tests.ts" + ] +} \ No newline at end of file diff --git a/imagemapster/imagemapster-tests.ts b/imagemapster/imagemapster-tests.ts index 7f9ec9d761..9712cb4e1a 100644 --- a/imagemapster/imagemapster-tests.ts +++ b/imagemapster/imagemapster-tests.ts @@ -1,6 +1,3 @@ -/// -/// - const areaOptions: ImageMapster.AreaRenderingOptions = { key: "foo", includeKeys: "foo", diff --git a/imagemapster/imagemapster.d.ts b/imagemapster/imagemapster.d.ts index ad9eed3066..0c28c2ad2b 100644 --- a/imagemapster/imagemapster.d.ts +++ b/imagemapster/imagemapster.d.ts @@ -3,7 +3,7 @@ // Definitions by: delphinus // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace ImageMapster { diff --git a/imagemapster/tsconfig.json b/imagemapster/tsconfig.json new file mode 100644 index 0000000000..02230dff2f --- /dev/null +++ b/imagemapster/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "imagemapster.d.ts", + "imagemapster-tests.ts" + ] +} \ No newline at end of file diff --git a/intl-tel-input/intl-tel-input-tests.ts b/intl-tel-input/intl-tel-input-tests.ts index c10acfffa0..0d23c40d75 100644 --- a/intl-tel-input/intl-tel-input-tests.ts +++ b/intl-tel-input/intl-tel-input-tests.ts @@ -1,6 +1,3 @@ -/// -/// - $('#phone').intlTelInput(); $('#phone').intlTelInput({ diff --git a/intl-tel-input/intl-tel-input.d.ts b/intl-tel-input/intl-tel-input.d.ts index c092084738..38ac9274ca 100644 --- a/intl-tel-input/intl-tel-input.d.ts +++ b/intl-tel-input/intl-tel-input.d.ts @@ -8,7 +8,7 @@ // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/jquery/jquery.d.ts#L958 // fn: any; //TODO: Decide how we want to type this -/// +/// declare namespace IntlTelInput { diff --git a/intl-tel-input/tsconfig.json b/intl-tel-input/tsconfig.json new file mode 100644 index 0000000000..2290a860c8 --- /dev/null +++ b/intl-tel-input/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "intl-tel-input.d.ts", + "intl-tel-input-tests.ts" + ] +} \ No newline at end of file diff --git a/inversify-binding-decorators/index.d.ts b/inversify-binding-decorators/index.d.ts new file mode 100644 index 0000000000..5887df8791 --- /dev/null +++ b/inversify-binding-decorators/index.d.ts @@ -0,0 +1,47 @@ +// Type definitions for inversify 1.0.0-beta.5 +// Project: https://github.com/inversify/inversify-binding-decorators +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +import inversify = require("inversify") + +interface IProvideInSyntax extends IProvideDoneSyntax { + inSingletonScope(): IProvideWhenOnSyntax; +} + +interface IProvideDoneSyntax { + done(): (target: any) => any; +} + +interface IProvideOnSyntax extends IProvideDoneSyntax { + onActivation(fn: (context: inversify.interfaces.Context, injectable: T) => T): IProvideWhenSyntax; +} + +interface IProvideInWhenOnSyntax extends IProvideInSyntax, IProvideWhenSyntax, IProvideOnSyntax {} + +interface IProvideWhenOnSyntax extends IProvideWhenSyntax, IProvideOnSyntax {} + +interface IProvideWhenSyntax extends IProvideDoneSyntax { + when(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; + whenTargetNamed(name: string): IProvideOnSyntax; + whenTargetTagged(tag: string, value: any): IProvideOnSyntax; + whenInjectedInto(parent: (Function|string)): IProvideOnSyntax; + whenParentNamed(name: string): IProvideOnSyntax; + whenParentTagged(tag: string, value: any): IProvideOnSyntax; + whenAnyAncestorIs(ancestor: (Function|string)): IProvideOnSyntax; + whenNoAncestorIs(ancestor: (Function|string)): IProvideOnSyntax; + whenAnyAncestorNamed(name: string): IProvideOnSyntax; + whenAnyAncestorTagged(tag: string, value: any): IProvideOnSyntax; + whenNoAncestorNamed(name: string): IProvideOnSyntax; + whenNoAncestorTagged(tag: string, value: any): IProvideOnSyntax; + whenAnyAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; + whenNoAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): IProvideOnSyntax; +} + +export function autoProvide(kernel: inversify.interfaces.Kernel, ...modules: any[]): void; + +export function makeProvideDecorator(kernel: inversify.interfaces.Kernel): + (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => (target: any) => any; + +export function makeFluentProvideDecorator(kernel: inversify.interfaces.Kernel): + (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => IProvideInWhenOnSyntax; diff --git a/inversify-binding-decorators/inversify-binding-decorators-tests.ts b/inversify-binding-decorators/inversify-binding-decorators-tests.ts index 8ca0acc551..f55d419429 100644 --- a/inversify-binding-decorators/inversify-binding-decorators-tests.ts +++ b/inversify-binding-decorators/inversify-binding-decorators-tests.ts @@ -1,5 +1,3 @@ -/// - import { inject, Kernel } from "inversify"; import { autoProvide, makeProvideDecorator, makeFluentProvideDecorator } from "inversify-binding-decorators"; diff --git a/inversify-binding-decorators/inversify-binding-decorators.d.ts b/inversify-binding-decorators/inversify-binding-decorators.d.ts deleted file mode 100644 index d5f92132a3..0000000000 --- a/inversify-binding-decorators/inversify-binding-decorators.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Type definitions for inversify-binding-decorators 1.0.0 -// Project: https://github.com/inversify/inversify-binding-decorators -// Definitions by: inversify -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare namespace inversifyBindingDecorators { - - namespace interfaces { - - export interface ProvideInSyntax extends ProvideDoneSyntax { - inSingletonScope(): ProvideWhenOnSyntax; - } - - export interface ProvideDoneSyntax { - done(): (target: any) => any; - } - - export interface ProvideOnSyntax extends ProvideDoneSyntax { - onActivation(fn: (context: inversify.interfaces.Context, injectable: T) => T): ProvideWhenSyntax; - } - - export interface ProvideInWhenOnSyntax extends ProvideInSyntax, ProvideWhenSyntax, ProvideOnSyntax {} - - export interface ProvideWhenOnSyntax extends ProvideWhenSyntax, ProvideOnSyntax {} - - export interface ProvideWhenSyntax extends ProvideDoneSyntax { - when(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; - whenTargetNamed(name: string): ProvideOnSyntax; - whenTargetTagged(tag: string, value: any): ProvideOnSyntax; - whenInjectedInto(parent: (Function|string)): ProvideOnSyntax; - whenParentNamed(name: string): ProvideOnSyntax; - whenParentTagged(tag: string, value: any): ProvideOnSyntax; - whenAnyAncestorIs(ancestor: (Function|string)): ProvideOnSyntax; - whenNoAncestorIs(ancestor: (Function|string)): ProvideOnSyntax; - whenAnyAncestorNamed(name: string): ProvideOnSyntax; - whenAnyAncestorTagged(tag: string, value: any): ProvideOnSyntax; - whenNoAncestorNamed(name: string): ProvideOnSyntax; - whenNoAncestorTagged(tag: string, value: any): ProvideOnSyntax; - whenAnyAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; - whenNoAncestorMatches(constraint: (request: inversify.interfaces.Request) => boolean): ProvideOnSyntax; - } - - } - - export function autoProvide(kernel: inversify.interfaces.Kernel, ...modules: any[]): void; - - export function makeProvideDecorator(kernel: inversify.interfaces.Kernel): - (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => (target: any) => any; - - export function makeFluentProvideDecorator(kernel: inversify.interfaces.Kernel): - (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => interfaces.ProvideInWhenOnSyntax; - -} - -declare module "inversify-binding-decorators" { - export = inversifyBindingDecorators; -} diff --git a/inversify-binding-decorators/tsconfig.json b/inversify-binding-decorators/tsconfig.json new file mode 100644 index 0000000000..0cfbf3bb2f --- /dev/null +++ b/inversify-binding-decorators/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "inversify-binding-decorators-tests.ts" + ] +} \ No newline at end of file diff --git a/inversify-devtools/inversify-devtools-test.ts b/inversify-devtools/inversify-devtools-test.ts index 3b99d7df93..0a148f013c 100644 --- a/inversify-devtools/inversify-devtools-test.ts +++ b/inversify-devtools/inversify-devtools-test.ts @@ -1,5 +1,3 @@ -/// - import render from "inversify-devtools"; import { Kernel } from "inversify"; diff --git a/inversify-devtools/inversify-devtools.d.ts b/inversify-devtools/inversify-devtools.d.ts index 841ae228c5..12e1bebd02 100644 --- a/inversify-devtools/inversify-devtools.d.ts +++ b/inversify-devtools/inversify-devtools.d.ts @@ -3,13 +3,10 @@ // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +import * as inversify from "inversify"; interface ConnectKernel extends Function { (kernel: inversify.interfaces.Kernel): void; } -declare module "inversify-devtools" { - let render: (container: string) => ConnectKernel; - export default render; -} +export default function render(container: string): ConnectKernel; diff --git a/inversify-devtools/tsconfig.json b/inversify-devtools/tsconfig.json new file mode 100644 index 0000000000..7493d3ee13 --- /dev/null +++ b/inversify-devtools/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "inversify-devtools.d.ts", + "inversify-devtools-test.ts" + ] +} \ No newline at end of file diff --git a/inversify-express-utils/inversify-express-utils-tests.ts b/inversify-express-utils/inversify-express-utils-tests.ts index b082546448..25591cd4bc 100644 --- a/inversify-express-utils/inversify-express-utils-tests.ts +++ b/inversify-express-utils/inversify-express-utils-tests.ts @@ -1,5 +1,3 @@ -/// - import { InversifyExpressServer, Controller, Get, All, Delete, Head, Put, Patch, Post, Method, TYPE } from "inversify-express-utils"; import * as express from "express"; import { Kernel } from "inversify"; diff --git a/inversify-express-utils/inversify-express-utils.d.ts b/inversify-express-utils/inversify-express-utils.d.ts index f90b0cac88..185b33363d 100644 --- a/inversify-express-utils/inversify-express-utils.d.ts +++ b/inversify-express-utils/inversify-express-utils.d.ts @@ -3,8 +3,8 @@ // Definitions by: inversify // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// -/// +/// +/// declare module "inversify-express-utils" { diff --git a/inversify-express-utils/tsconfig.json b/inversify-express-utils/tsconfig.json new file mode 100644 index 0000000000..c7e399100e --- /dev/null +++ b/inversify-express-utils/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "inversify-express-utils.d.ts", + "inversify-express-utils-tests.ts" + ] +} \ No newline at end of file diff --git a/inversify-inject-decorators/index.d.ts b/inversify-inject-decorators/index.d.ts new file mode 100644 index 0000000000..9b0c628eb2 --- /dev/null +++ b/inversify-inject-decorators/index.d.ts @@ -0,0 +1,23 @@ +// Type definitions for inversify-inject-decorators 1.0.0-beta.1 +// Project: https://github.com/inversify/inversify-inject-decorators +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +import inversify = require("inversify") + +interface InjectDecorators { + + lazyInject: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => + (proto: any, key: string) => void; + + lazyInjectNamed: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable), named: string) => + (proto: any, key: string) => void; + + lazyInjectTagged: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable), key: string, value: any) => + (proto: any, propertyName: string) => void; + + lazyMultiInject: (serviceIdentifier: (string|Symbol|inversify.interfaces.Newable)) => + (proto: any, key: string) => void; +} + +export default function getDecorators(kernel: inversify.interfaces.Kernel): InjectDecorators; diff --git a/inversify-inject-decorators/inversify-inject-decorators-tests.ts b/inversify-inject-decorators/inversify-inject-decorators-tests.ts index 468bbaf763..577d4f5b1c 100644 --- a/inversify-inject-decorators/inversify-inject-decorators-tests.ts +++ b/inversify-inject-decorators/inversify-inject-decorators-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import getDecorators from "inversify-inject-decorators"; import { Kernel, injectable, tagged, named } from "inversify"; diff --git a/inversify-inject-decorators/inversify-inject-decorators.d.ts b/inversify-inject-decorators/inversify-inject-decorators.d.ts deleted file mode 100644 index 34244c6d5e..0000000000 --- a/inversify-inject-decorators/inversify-inject-decorators.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Type definitions for inversify-inject-decorators 1.0.0 -// Project: https://github.com/inversify/inversify-inject-decorators -// Definitions by: inversify -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare namespace inversifyInjectDecorators { - - export interface InjectDecorators { - - lazyInject: (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => - (proto: any, key: string) => void; - - lazyInjectNamed: (serviceIdentifier: inversify.interfaces.ServiceIdentifier, named: string) => - (proto: any, key: string) => void; - - lazyInjectTagged: (serviceIdentifier: inversify.interfaces.ServiceIdentifier, key: string, value: any) => - (proto: any, propertyName: string) => void; - - lazyMultiInject: (serviceIdentifier: inversify.interfaces.ServiceIdentifier) => - (proto: any, key: string) => void; - - } - -} - -declare module "inversify-inject-decorators" { - let getDecorators: (kernel: inversify.interfaces.Kernel) => inversifyInjectDecorators.InjectDecorators; - export default getDecorators; -} diff --git a/inversify-inject-decorators/tsconfig.json b/inversify-inject-decorators/tsconfig.json new file mode 100644 index 0000000000..7b922e01fa --- /dev/null +++ b/inversify-inject-decorators/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "inversify-inject-decorators-tests.ts" + ] +} \ No newline at end of file diff --git a/inversify-logger-middleware/index.d.ts b/inversify-logger-middleware/index.d.ts new file mode 100644 index 0000000000..aba35a5d21 --- /dev/null +++ b/inversify-logger-middleware/index.d.ts @@ -0,0 +1,65 @@ +// Type definitions for inversify-logger-middleware 1.0.0 +// Project: https://github.com/inversify/inversify-logger-middleware +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +import * as inversify from "inversify"; + +export namespace interfaces { + + export interface LoggerSettings { + request?: RequestLoggerSettings; + time?: boolean; + } + + export interface RequestLoggerSettings { + serviceIdentifier?: boolean; + bindings?: BindingLoggerSettings; + target?: TargetLoggerSettings; + } + + export interface BindingLoggerSettings { + activated?: boolean; + serviceIdentifier?: boolean; + implementationType?: boolean; + factory?: boolean; + provider?: boolean; + constraint?: boolean; + onActivation?: boolean; + cache?: boolean; + dynamicValue?: boolean; + scope?: boolean; + type?: boolean; + } + + export interface TargetLoggerSettings { + serviceIdentifier?: boolean; + name?: boolean; + metadata?: boolean; + } + + export interface LogEntry { + error: boolean; + exception: any; + guid: string; + multiInject: boolean; + results: any[]; + rootRequest: inversify.interfaces.Request; + serviceIdentifier: any; + target: any; + time: string; + } + +} + +export function makeLoggerMiddleware( + settings?: interfaces.LoggerSettings, + renderer?: (out: interfaces.LogEntry) => void +): inversify.interfaces.Middleware; + +export function textSerializer(entry: interfaces.LogEntry): string; +export function bindingTypeFormatter(type: number): string; +export function scopeFormatter(scope: number): string; + + +export as namespace inversifyLoggerMiddleware; diff --git a/inversify-logger-middleware/inversify-logger-middleware-tests.ts b/inversify-logger-middleware/inversify-logger-middleware-tests.ts index 3b2119911a..ba33687072 100644 --- a/inversify-logger-middleware/inversify-logger-middleware-tests.ts +++ b/inversify-logger-middleware/inversify-logger-middleware-tests.ts @@ -1,7 +1,8 @@ -/// +import * as inversify from "inversify"; declare var kernel: inversify.interfaces.Kernel; +import * as inversifyLoggerMiddleware from "inversify-logger-middleware"; import { makeLoggerMiddleware, textSerializer } from "inversify-logger-middleware"; interface LoggerOutput { diff --git a/inversify-logger-middleware/inversify-logger-middleware.d.ts b/inversify-logger-middleware/inversify-logger-middleware.d.ts deleted file mode 100644 index cd0037f432..0000000000 --- a/inversify-logger-middleware/inversify-logger-middleware.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Type definitions for inversify-logger-middleware 1.0.0 -// Project: https://github.com/inversify/inversify-logger-middleware -// Definitions by: inversify -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// - -declare namespace inversifyLoggerMiddleware { - - export namespace interfaces { - - export interface LoggerSettings { - request?: RequestLoggerSettings; - time?: boolean; - } - - export interface RequestLoggerSettings { - serviceIdentifier?: boolean; - bindings?: BindingLoggerSettings; - target?: TargetLoggerSettings; - } - - export interface BindingLoggerSettings { - activated?: boolean; - serviceIdentifier?: boolean; - implementationType?: boolean; - factory?: boolean; - provider?: boolean; - constraint?: boolean; - onActivation?: boolean; - cache?: boolean; - dynamicValue?: boolean; - scope?: boolean; - type?: boolean; - } - - export interface TargetLoggerSettings { - serviceIdentifier?: boolean; - name?: boolean; - metadata?: boolean; - } - - export interface LogEntry { - error: boolean; - exception: any; - guid: string; - multiInject: boolean; - results: any[]; - rootRequest: inversify.interfaces.Request; - serviceIdentifier: any; - target: any; - time: string; - } - - } - - export function makeLoggerMiddleware( - settings?: interfaces.LoggerSettings, - renderer?: (out: interfaces.LogEntry) => void - ): inversify.interfaces.Middleware; - - export function textSerializer(entry: interfaces.LogEntry): string; - export function bindingTypeFormatter(type: number): string; - export function scopeFormatter(scope: number): string; - -} - -declare module "inversify-logger-middleware" { - export = inversifyLoggerMiddleware; -} diff --git a/inversify-logger-middleware/tsconfig.json b/inversify-logger-middleware/tsconfig.json new file mode 100644 index 0000000000..363943998d --- /dev/null +++ b/inversify-logger-middleware/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "inversify-logger-middleware-tests.ts" + ] +} \ No newline at end of file diff --git a/inversify-restify-utils/index.d.ts b/inversify-restify-utils/index.d.ts new file mode 100644 index 0000000000..211351db73 --- /dev/null +++ b/inversify-restify-utils/index.d.ts @@ -0,0 +1,52 @@ +// Type definitions for inversify-restify-utils 1.0.0 +// Project: https://github.com/inversify/inversify-restify-utils +// Definitions by: inversify +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +import * as restify from "restify"; +import * as inversify from "inversify"; + +export namespace interfaces { + + export interface InversifyRestifyServerConstructor { + new(kernel: inversify.interfaces.Kernel): InversifyRestifyServer; + } + + export interface InversifyRestifyServer { + setConfig(fn: ConfigFunction): InversifyRestifyServer; + build(): restify.Server; + } + + export interface ConfigFunction { + (app: restify.Server): void; + } + + export interface HandlerDecoratorFactory { + (path: string, ...middleware: restify.RequestHandler[]): HandlerDecorator; + } + + export interface HandlerDecorator { + (target: any, key: string, value: any): void; + } + +} + +export interface Controller {} + +interface ServiceIdentifiers { + Controller: Symbol; +} + +export var InversifyRestifyServer: interfaces.InversifyRestifyServerConstructor; + +export var Controller: (path: string, ...middleware: restify.RequestHandler[]) => (target: any) => void; + +export var Options: interfaces.HandlerDecoratorFactory; +export var Get: interfaces.HandlerDecoratorFactory; +export var Post: interfaces.HandlerDecoratorFactory; +export var Put: interfaces.HandlerDecoratorFactory; +export var Patch: interfaces.HandlerDecoratorFactory; +export var Head: interfaces.HandlerDecoratorFactory; +export var Delete: interfaces.HandlerDecoratorFactory; +export var Method: (method: string, path: string, ...middleware: restify.RequestHandler[]) => interfaces.HandlerDecorator; +export var TYPE: ServiceIdentifiers; diff --git a/inversify-restify-utils/inversify-restify-utils-tests.ts b/inversify-restify-utils/inversify-restify-utils-tests.ts index 5ff3ddc633..1190c16083 100644 --- a/inversify-restify-utils/inversify-restify-utils-tests.ts +++ b/inversify-restify-utils/inversify-restify-utils-tests.ts @@ -1,5 +1,3 @@ -/// - import { InversifyRestifyServer, Controller, Get, Options, Delete, Head, Put, Patch, Post, Method, TYPE diff --git a/inversify-restify-utils/inversify-restify-utils.d.ts b/inversify-restify-utils/inversify-restify-utils.d.ts deleted file mode 100644 index 4f2aab5510..0000000000 --- a/inversify-restify-utils/inversify-restify-utils.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Type definitions for inversify-restify-utils 1.0.0 -// Project: https://github.com/inversify/inversify-restify-utils -// Definitions by: inversify -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// - -declare module "inversify-restify-utils" { - - import * as restify from "restify"; - import * as inversify from "inversify"; - - export namespace interfaces { - - export interface InversifyRestifyServerConstructor { - new(kernel: inversify.interfaces.Kernel): InversifyRestifyServer; - } - - export interface InversifyRestifyServer { - setConfig(fn: ConfigFunction): InversifyRestifyServer; - build(): restify.Server; - } - - export interface ConfigFunction { - (app: restify.Server): void; - } - - export interface HandlerDecoratorFactory { - (path: string, ...middleware: restify.RequestHandler[]): HandlerDecorator; - } - - export interface HandlerDecorator { - (target: any, key: string, value: any): void; - } - - } - - export interface Controller {} - - interface ServiceIdentifiers { - Controller: Symbol; - } - - export var InversifyRestifyServer: interfaces.InversifyRestifyServerConstructor; - - export var Controller: (path: string, ...middleware: restify.RequestHandler[]) => (target: any) => void; - - export var Options: interfaces.HandlerDecoratorFactory; - export var Get: interfaces.HandlerDecoratorFactory; - export var Post: interfaces.HandlerDecoratorFactory; - export var Put: interfaces.HandlerDecoratorFactory; - export var Patch: interfaces.HandlerDecoratorFactory; - export var Head: interfaces.HandlerDecoratorFactory; - export var Delete: interfaces.HandlerDecoratorFactory; - export var Method: (method: string, path: string, ...middleware: restify.RequestHandler[]) => interfaces.HandlerDecorator; - export var TYPE: ServiceIdentifiers; - -} diff --git a/inversify-restify-utils/tsconfig.json b/inversify-restify-utils/tsconfig.json new file mode 100644 index 0000000000..c610f4fb27 --- /dev/null +++ b/inversify-restify-utils/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "inversify-restify-utils-tests.ts" + ] +} \ No newline at end of file diff --git a/istanbul-middleware/istanbul-middleware-tests.ts b/istanbul-middleware/istanbul-middleware-tests.ts index 01afa92082..2a436fa0f5 100644 --- a/istanbul-middleware/istanbul-middleware-tests.ts +++ b/istanbul-middleware/istanbul-middleware-tests.ts @@ -1,2 +1 @@ -/// import i = require('istanbul-middleware'); diff --git a/istanbul-middleware/istanbul-middleware.d.ts b/istanbul-middleware/istanbul-middleware.d.ts index 054e32931e..d9c020d5f8 100644 --- a/istanbul-middleware/istanbul-middleware.d.ts +++ b/istanbul-middleware/istanbul-middleware.d.ts @@ -3,7 +3,7 @@ // Definitions by: Hookclaw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "istanbul-middleware" { import * as express from "express"; diff --git a/istanbul-middleware/tsconfig.json b/istanbul-middleware/tsconfig.json new file mode 100644 index 0000000000..e755a0b80e --- /dev/null +++ b/istanbul-middleware/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "istanbul-middleware.d.ts", + "istanbul-middleware-tests.ts" + ] +} \ No newline at end of file diff --git a/jquery-mousewheel/jquery-mousewheel-tests.ts b/jquery-mousewheel/jquery-mousewheel-tests.ts index 7f8807d7bb..706906b2ee 100644 --- a/jquery-mousewheel/jquery-mousewheel-tests.ts +++ b/jquery-mousewheel/jquery-mousewheel-tests.ts @@ -1,6 +1,4 @@ -/// - -$('#my_elem').on('mousewheel', (event: JQueryMousewheel.JQueryMousewheelEventObject) => { +$('#my_elem').on('mousewheel', (event: JQueryMousewheel.JQueryMousewheelEventObject) => { console.log(event.deltaX, event.deltaY, event.deltaFactor, event.deltaMode, event.absDelta); }); diff --git a/jquery-mousewheel/jquery-mousewheel.d.ts b/jquery-mousewheel/jquery-mousewheel.d.ts index 1061e49f28..e57d73be5b 100644 --- a/jquery-mousewheel/jquery-mousewheel.d.ts +++ b/jquery-mousewheel/jquery-mousewheel.d.ts @@ -3,7 +3,7 @@ // Definitions by: Brian Surowiec // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace JQueryMousewheel { interface JQueryMousewheelEventObject extends JQueryEventObject { diff --git a/jquery-mousewheel/tsconfig.json b/jquery-mousewheel/tsconfig.json new file mode 100644 index 0000000000..0c0c88bcb6 --- /dev/null +++ b/jquery-mousewheel/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "jquery-mousewheel.d.ts", + "jquery-mousewheel-tests.ts" + ] +} \ No newline at end of file diff --git a/jquery-truncate-html/jquery-truncate-html-tests.ts b/jquery-truncate-html/jquery-truncate-html-tests.ts index e20f9c22ee..8ec263cbc3 100644 --- a/jquery-truncate-html/jquery-truncate-html-tests.ts +++ b/jquery-truncate-html/jquery-truncate-html-tests.ts @@ -1,6 +1,3 @@ -/// - - function truncateHtmlString(): string { return $.truncate('

Stuff and Nonsense

', { length: 13 @@ -11,4 +8,4 @@ function truncateVirtualElement (): JQuery { return $('

Stuff and Nonsense

').truncate({ length: 13 }); -} +} diff --git a/jquery-truncate-html/jquery-truncate-html.d.ts b/jquery-truncate-html/jquery-truncate-html.d.ts index e410716b0a..cb9b749e48 100644 --- a/jquery-truncate-html/jquery-truncate-html.d.ts +++ b/jquery-truncate-html/jquery-truncate-html.d.ts @@ -1,9 +1,9 @@ -// Type definitions for jQuery-truncate-html.js +// Type definitions for jQuery-truncate-html.js // Project: https://github.com/kbwood/timeentry // Definitions by: Abraão Alves // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// interface TruncateOptions{ length?: number; diff --git a/jquery-truncate-html/tsconfig.json b/jquery-truncate-html/tsconfig.json new file mode 100644 index 0000000000..a282bbf024 --- /dev/null +++ b/jquery-truncate-html/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "jquery-truncate-html.d.ts", + "jquery-truncate-html-tests.ts" + ] +} \ No newline at end of file diff --git a/jquery/index.d.ts b/jquery/index.d.ts index b08598cc53..0a748d5269 100644 --- a/jquery/index.d.ts +++ b/jquery/index.d.ts @@ -74,7 +74,7 @@ interface JQueryAjaxSettings { */ dataFilter? (data: any, ty: any): any; /** - * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). + * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). */ dataType?: string; /** @@ -168,11 +168,11 @@ interface JQueryAjaxSettings { */ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { /** - * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). + * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). */ overrideMimeType(mimeType: string): any; /** - * Cancel the request. + * Cancel the request. * * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled" */ @@ -197,13 +197,13 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { interface JQueryCallback { /** * Add a callback or a collection of callbacks to a callback list. - * + * * @param callbacks A function, or array of functions, that are to be added to the callback list. */ add(callbacks: Function): JQueryCallback; /** * Add a callback or a collection of callbacks to a callback list. - * + * * @param callbacks A function, or array of functions, that are to be added to the callback list. */ add(callbacks: Function[]): JQueryCallback; @@ -225,7 +225,7 @@ interface JQueryCallback { /** * Call all of the callbacks with the given arguments - * + * * @param arguments The argument or list of arguments to pass back to the callback list. */ fire(...arguments: any[]): JQueryCallback; @@ -237,7 +237,7 @@ interface JQueryCallback { /** * Call all callbacks in a list with the given context and arguments. - * + * * @param context A reference to the context in which the callbacks in the list should be fired. * @param arguments An argument, or array of arguments, to pass to the callbacks in the list. */ @@ -245,7 +245,7 @@ interface JQueryCallback { /** * Determine whether a supplied callback is in a list - * + * * @param callback The callback to search for. */ has(callback: Function): boolean; @@ -262,13 +262,13 @@ interface JQueryCallback { /** * Remove a callback or a collection of callbacks from a callback list. - * + * * @param callbacks A function, or array of functions, that are to be removed from the callback list. */ remove(callbacks: Function): JQueryCallback; /** * Remove a callback or a collection of callbacks from a callback list. - * + * * @param callbacks A function, or array of functions, that are to be removed from the callback list. */ remove(callbacks: Function[]): JQueryCallback; @@ -280,7 +280,7 @@ interface JQueryCallback { interface JQueryGenericPromise { /** * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * + * * @param doneFilter A function that is called when the Deferred is resolved. * @param failFilter An optional function that is called when the Deferred is rejected. */ @@ -288,7 +288,7 @@ interface JQueryGenericPromise { /** * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress. - * + * * @param doneFilter A function that is called when the Deferred is resolved. * @param failFilter An optional function that is called when the Deferred is rejected. */ @@ -316,28 +316,28 @@ interface JQueryPromise extends JQueryGenericPromise { state(): string; /** * Add handlers to be called when the Deferred object is either resolved or rejected. - * + * * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. */ always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; /** * Add handlers to be called when the Deferred object is resolved. - * + * * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. */ done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; /** * Add handlers to be called when the Deferred object is rejected. - * + * * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. */ fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryPromise; /** * Add handlers to be called when the Deferred object generates progress notifications. - * + * * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. */ progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryPromise; @@ -356,42 +356,42 @@ interface JQueryDeferred extends JQueryGenericPromise { state(): string; /** * Add handlers to be called when the Deferred object is either resolved or rejected. - * + * * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected. * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected. */ always(alwaysCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...alwaysCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; /** * Add handlers to be called when the Deferred object is resolved. - * + * * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved. * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved. */ done(doneCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...doneCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; /** * Add handlers to be called when the Deferred object is rejected. - * + * * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected. * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected. */ fail(failCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...failCallbacksN: Array|JQueryPromiseCallback[]>): JQueryDeferred; /** * Add handlers to be called when the Deferred object generates progress notifications. - * + * * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications. */ progress(progressCallback1?: JQueryPromiseCallback|JQueryPromiseCallback[], ...progressCallbackN: Array|JQueryPromiseCallback[]>): JQueryDeferred; /** * Call the progressCallbacks on a Deferred object with the given args. - * + * * @param args Optional arguments that are passed to the progressCallbacks. */ notify(value?: any, ...args: any[]): JQueryDeferred; /** * Call the progressCallbacks on a Deferred object with the given context and args. - * + * * @param context Context passed to the progressCallbacks as the this object. * @param args Optional arguments that are passed to the progressCallbacks. */ @@ -399,13 +399,13 @@ interface JQueryDeferred extends JQueryGenericPromise { /** * Reject a Deferred object and call any failCallbacks with the given args. - * + * * @param args Optional arguments that are passed to the failCallbacks. */ reject(value?: any, ...args: any[]): JQueryDeferred; /** * Reject a Deferred object and call any failCallbacks with the given context and args. - * + * * @param context Context passed to the failCallbacks as the this object. * @param args An optional array of arguments that are passed to the failCallbacks. */ @@ -413,7 +413,7 @@ interface JQueryDeferred extends JQueryGenericPromise { /** * Resolve a Deferred object and call any doneCallbacks with the given args. - * + * * @param value First argument passed to doneCallbacks. * @param args Optional subsequent arguments that are passed to the doneCallbacks. */ @@ -421,7 +421,7 @@ interface JQueryDeferred extends JQueryGenericPromise { /** * Resolve a Deferred object and call any doneCallbacks with the given context and args. - * + * * @param context Context passed to the doneCallbacks as the this object. * @param args An optional array of arguments that are passed to the doneCallbacks. */ @@ -429,7 +429,7 @@ interface JQueryDeferred extends JQueryGenericPromise { /** * Return a Deferred's Promise object. - * + * * @param target Object onto which the promise methods have to be attached */ promise(target?: any): JQueryPromise; @@ -520,14 +520,14 @@ interface JQuerySupport { interface JQueryParam { /** * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * + * * @param obj An array or object to serialize. */ (obj: any): string; /** * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request. - * + * * @param obj An array or object to serialize. * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization. */ @@ -561,47 +561,47 @@ interface JQuerySerializeArrayElement { value: string; } -interface JQueryAnimationOptions { +interface JQueryAnimationOptions { /** * A string or number determining how long the animation will run. */ - duration?: any; + duration?: any; /** * A string indicating which easing function to use for the transition. */ - easing?: string; + easing?: string; /** * A function to call once the animation is complete. */ - complete?: Function; + complete?: Function; /** * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. */ - step?: (now: number, tween: any) => any; + step?: (now: number, tween: any) => any; /** * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8) */ - progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; + progress?: (animation: JQueryPromise, progress: number, remainingMs: number) => any; /** * A function to call when the animation begins. (version added: 1.8) */ - start?: (animation: JQueryPromise) => any; + start?: (animation: JQueryPromise) => any; /** * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8) */ - done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; + done?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; /** * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8) */ - fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; + fail?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; /** * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8) */ - always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; + always?: (animation: JQueryPromise, jumpedToEnd: boolean) => any; /** * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. */ - queue?: any; + queue?: any; /** * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4) */ @@ -965,7 +965,7 @@ interface JQueryStatic { /** * Check to see if a DOM element is a descendant of another DOM element. - * + * * @param container The DOM element that may contain the other element. * @param contained The DOM element that may be contained by (a descendant of) the other element. */ @@ -973,7 +973,7 @@ interface JQueryStatic { /** * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * + * * @param collection The object or array to iterate over. * @param callback The function that will be executed on every object. */ @@ -984,7 +984,7 @@ interface JQueryStatic { /** * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. - * + * * @param collection The object or array to iterate over. * @param callback The function that will be executed on every object. */ @@ -1081,21 +1081,21 @@ interface JQueryStatic { /** * Convert an array-like object into a true JavaScript array. - * + * * @param obj Any object to turn into a native Array. */ makeArray(obj: any): any[]; /** * Translate all items in an array or object to new array of items. - * + * * @param array The Array to translate. * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object. */ map(array: T[], callback: (elementOfArray?: T, indexInArray?: number) => U): U[]; /** * Translate all items in an array or object to new array of items. - * + * * @param arrayOrObject The Array or Object to translate. * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object. */ @@ -1103,7 +1103,7 @@ interface JQueryStatic { /** * Merge the contents of two arrays together into the first array. - * + * * @param first The first array to merge, the elements of second added. * @param second The second array to merge into the first, unaltered. */ @@ -1121,7 +1121,7 @@ interface JQueryStatic { /** * Takes a well-formed JSON string and returns the resulting JavaScript object. - * + * * @param json The JSON string to parse. */ parseJSON(json: string): any; @@ -1135,21 +1135,21 @@ interface JQueryStatic { /** * Remove the whitespace from the beginning and end of a string. - * + * * @param str Remove the whitespace from the beginning and end of a string. */ trim(str: string): string; /** * Determine the internal JavaScript [[Class]] of an object. - * + * * @param obj Object to get the internal JavaScript [[Class]] of. */ type(obj: any): string; /** * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers. - * + * * @param array The Array of DOM elements. */ unique(array: Element[]): Element[]; @@ -1276,7 +1276,7 @@ interface JQuery { * @param attributes An object of attribute-value pairs to set. */ attr(attributes: Object): JQuery; - + /** * Determine whether any of the matched elements are assigned the given class. * @@ -1454,7 +1454,7 @@ interface JQuery { * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). */ innerHeight(height: number|string): JQuery; - + /** * Get the current computed width for the first element in the set of matched elements, including padding but not border. */ @@ -1466,7 +1466,7 @@ interface JQuery { * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). */ innerWidth(width: number|string): JQuery; - + /** * Get the current coordinates of the first element in the set of matched elements, relative to the document. */ @@ -1899,7 +1899,7 @@ interface JQuery { /** * Attach a handler to an event for the elements. - * + * * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param eventData An object containing data that will be passed to the event handler. * @param handler A function to execute each time the event is triggered. @@ -1907,14 +1907,14 @@ interface JQuery { bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery; /** * Attach a handler to an event for the elements. - * + * * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param handler A function to execute each time the event is triggered. */ bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery; /** * Attach a handler to an event for the elements. - * + * * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param eventData An object containing data that will be passed to the event handler. * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. @@ -1922,14 +1922,14 @@ interface JQuery { bind(eventType: string, eventData: any, preventBubble: boolean): JQuery; /** * Attach a handler to an event for the elements. - * + * * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true. */ bind(eventType: string, preventBubble: boolean): JQuery; /** * Attach a handler to an event for the elements. - * + * * @param events An object containing one or more DOM event types and functions to execute for them. */ bind(events: any): JQuery; @@ -2504,14 +2504,14 @@ interface JQuery { /** * Execute all handlers and behaviors attached to the matched elements for the given event type. - * + * * @param eventType A string containing a JavaScript event type, such as click or submit. * @param extraParameters Additional parameters to pass along to the event handler. */ trigger(eventType: string, extraParameters?: any[]|Object): JQuery; /** * Execute all handlers and behaviors attached to the matched elements for the given event type. - * + * * @param event A jQuery.Event object. * @param extraParameters Additional parameters to pass along to the event handler. */ @@ -2519,7 +2519,7 @@ interface JQuery { /** * Execute all handlers attached to an element for an event. - * + * * @param eventType A string containing a JavaScript event type, such as click or submit. * @param extraParameters An array of additional parameters to pass along to the event handler. */ @@ -2527,7 +2527,7 @@ interface JQuery { /** * Execute all handlers attached to an element for an event. - * + * * @param event A jQuery.Event object. * @param extraParameters An array of additional parameters to pass along to the event handler. */ @@ -2535,21 +2535,21 @@ interface JQuery { /** * Remove a previously-attached event handler from the elements. - * + * * @param eventType A string containing a JavaScript event type, such as click or submit. * @param handler The function that is to be no longer executed. */ unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; /** * Remove a previously-attached event handler from the elements. - * + * * @param eventType A string containing a JavaScript event type, such as click or submit. * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ). */ unbind(eventType: string, fls: boolean): JQuery; /** * Remove a previously-attached event handler from the elements. - * + * * @param evt A JavaScript event object as passed to an event handler. */ unbind(evt: any): JQuery; @@ -2560,7 +2560,7 @@ interface JQuery { undelegate(): JQuery; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * + * * @param selector A selector which will be used to filter the event results. * @param eventType A string containing a JavaScript event type, such as "click" or "keydown" * @param handler A function to execute at the time the event is triggered. @@ -2568,27 +2568,27 @@ interface JQuery { undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * + * * @param selector A selector which will be used to filter the event results. * @param events An object of one or more event types and previously bound functions to unbind from them. */ undelegate(selector: string, events: Object): JQuery; /** * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements. - * + * * @param namespace A string containing a namespace to unbind all events from. */ undelegate(namespace: string): JQuery; /** * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * + * * @param handler A function to execute when the event is triggered. */ unload(handler: (eventObject: JQueryEventObject) => any): JQuery; /** * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8) - * + * * @param eventData A plain object of data that will be passed to the event handler. * @param handler A function to execute when the event is triggered. */ @@ -2603,13 +2603,13 @@ interface JQuery { /** * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * + * * @param handler A function to execute when the event is triggered. */ error(handler: (eventObject: JQueryEventObject) => any): JQuery; /** * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8) - * + * * @param eventData A plain object of data that will be passed to the event handler. * @param handler A function to execute when the event is triggered. */ @@ -2617,13 +2617,13 @@ interface JQuery { /** * Add a collection of DOM elements onto the jQuery stack. - * + * * @param elements An array of elements to push onto the stack and make into a new jQuery object. */ pushStack(elements: any[]): JQuery; /** * Add a collection of DOM elements onto the jQuery stack. - * + * * @param elements An array of elements to push onto the stack and make into a new jQuery object. * @param name The name of a jQuery method that generated the array of elements. * @param arguments The arguments that were passed in to the jQuery method (for serialization). @@ -2632,56 +2632,56 @@ interface JQuery { /** * Insert content, specified by the parameter, after each element in the set of matched elements. - * + * * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert after each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements. */ after(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, after each element in the set of matched elements. - * + * * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. */ after(func: (index: number, html: string) => string|Element|JQuery): JQuery; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * + * * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements. */ append(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, to the end of each element in the set of matched elements. - * + * * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. */ append(func: (index: number, html: string) => string|Element|JQuery): JQuery; /** * Insert every element in the set of matched elements to the end of the target. - * + * * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter. */ appendTo(target: JQuery|any[]|Element|string): JQuery; /** * Insert content, specified by the parameter, before each element in the set of matched elements. - * + * * param content1 HTML string, DOM element, DocumentFragment, array of elements, or jQuery object to insert before each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements. */ before(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, before each element in the set of matched elements. - * + * * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. */ before(func: (index: number, html: string) => string|Element|JQuery): JQuery; /** * Create a deep copy of the set of matched elements. - * + * * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false. * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false). */ @@ -2689,7 +2689,7 @@ interface JQuery { /** * Remove the set of matched elements from the DOM. - * + * * param selector A selector expression that filters the set of matched elements to be removed. */ detach(selector?: string): JQuery; @@ -2701,62 +2701,62 @@ interface JQuery { /** * Insert every element in the set of matched elements after the target. - * + * * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. */ insertAfter(target: JQuery|any[]|Element|Text|string): JQuery; /** * Insert every element in the set of matched elements before the target. - * + * * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. */ insertBefore(target: JQuery|any[]|Element|Text|string): JQuery; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * + * * param content1 DOM element, DocumentFragment, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements. */ prepend(content1: JQuery|any[]|Element|DocumentFragment|Text|string, ...content2: any[]): JQuery; /** * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. - * + * * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set. */ prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery; /** * Insert every element in the set of matched elements to the beginning of the target. - * + * * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter. */ prependTo(target: JQuery|any[]|Element|string): JQuery; /** * Remove the set of matched elements from the DOM. - * + * * @param selector A selector expression that filters the set of matched elements to be removed. */ remove(selector?: string): JQuery; /** * Replace each target element with the set of matched elements. - * + * * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. */ replaceAll(target: JQuery|any[]|Element|string): JQuery; /** * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * + * * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. */ replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery; /** * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. - * + * * param func A function that returns content with which to replace the set of matched elements. */ replaceWith(func: () => Element|JQuery): JQuery; @@ -2767,13 +2767,13 @@ interface JQuery { text(): string; /** * Set the content of each element in the set of matched elements to the specified text. - * + * * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation. */ text(text: string|number|boolean): JQuery; /** * Set the content of each element in the set of matched elements to the specified text. - * + * * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments. */ text(func: (index: number, text: string) => string): JQuery; @@ -2791,20 +2791,20 @@ interface JQuery { /** * Wrap an HTML structure around each element in the set of matched elements. - * + * * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. */ wrap(wrappingElement: JQuery|Element|string): JQuery; /** * Wrap an HTML structure around each element in the set of matched elements. - * + * * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. */ wrap(func: (index: number) => string|JQuery): JQuery; /** * Wrap an HTML structure around all elements in the set of matched elements. - * + * * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. */ wrapAll(wrappingElement: JQuery|Element|string): JQuery; @@ -2812,27 +2812,27 @@ interface JQuery { /** * Wrap an HTML structure around the content of each element in the set of matched elements. - * + * * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. */ wrapInner(wrappingElement: JQuery|Element|string): JQuery; /** * Wrap an HTML structure around the content of each element in the set of matched elements. - * + * * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set. */ wrapInner(func: (index: number) => string): JQuery; /** * Iterate over a jQuery object, executing a function for each matched element. - * + * * @param func A function to execute for each matched element. */ each(func: (index: number, elem: Element) => any): JQuery; /** * Retrieve one of the elements matched by the jQuery object. - * + * * @param index A zero-based integer indicating which element to retrieve. */ get(index: number): HTMLElement; @@ -2848,7 +2848,7 @@ interface JQuery { index(): number; /** * Search for a given element from among the matched elements. - * + * * @param selector A selector representing a jQuery collection in which to look for an element. */ index(selector: string|JQuery|Element): number; @@ -2867,66 +2867,66 @@ interface JQuery { /** * Add elements to the set of matched elements. - * + * * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements. * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method. */ add(selector: string, context?: Element): JQuery; /** * Add elements to the set of matched elements. - * + * * @param elements One or more elements to add to the set of matched elements. */ add(...elements: Element[]): JQuery; /** * Add elements to the set of matched elements. - * + * * @param html An HTML fragment to add to the set of matched elements. */ add(html: string): JQuery; /** * Add elements to the set of matched elements. - * + * * @param obj An existing jQuery object to add to the set of matched elements. */ add(obj: JQuery): JQuery; /** * Get the children of each element in the set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ children(selector?: string): JQuery; /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * + * * @param selector A string containing a selector expression to match elements against. */ closest(selector: string): JQuery; /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * + * * @param selector A string containing a selector expression to match elements against. * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. */ closest(selector: string, context?: Element): JQuery; /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * + * * @param obj A jQuery object to match elements against. */ closest(obj: JQuery): JQuery; /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. - * + * * @param element An element to match elements against. */ closest(element: Element): JQuery; /** * Get an array of all the elements and selectors matched against the current element up through the DOM tree. - * + * * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object). * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead. */ @@ -2944,52 +2944,52 @@ interface JQuery { /** * Reduce the set of matched elements to the one at the specified index. - * + * * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set. - * + * */ eq(index: number): JQuery; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. - * + * * @param selector A string containing a selector expression to match the current set of elements against. */ filter(selector: string): JQuery; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. - * + * * @param func A function used as a test for each element in the set. this is the current DOM element. */ filter(func: (index: number, element: Element) => any): JQuery; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. - * + * * @param element An element to match the current set of elements against. */ filter(element: Element): JQuery; /** * Reduce the set of matched elements to those that match the selector or pass the function's test. - * + * * @param obj An existing jQuery object to match the current set of elements against. */ filter(obj: JQuery): JQuery; /** * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * + * * @param selector A string containing a selector expression to match elements against. */ find(selector: string): JQuery; /** * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * + * * @param element An element to match elements against. */ find(element: Element): JQuery; /** * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. - * + * * @param obj A jQuery object to match elements against. */ find(obj: JQuery): JQuery; @@ -3001,38 +3001,38 @@ interface JQuery { /** * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * + * * @param selector A string containing a selector expression to match elements against. */ has(selector: string): JQuery; /** * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element. - * + * * @param contained A DOM element to match elements against. */ has(contained: Element): JQuery; /** * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * + * * @param selector A string containing a selector expression to match elements against. */ is(selector: string): boolean; /** * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * + * * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element. */ is(func: (index: number, element: Element) => boolean): boolean; /** * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * + * * @param obj An existing jQuery object to match the current set of elements against. */ is(obj: JQuery): boolean; /** * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments. - * + * * @param elements One or more elements to match the current set of elements against. */ is(elements: any): boolean; @@ -3044,42 +3044,42 @@ interface JQuery { /** * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values. - * + * * @param callback A function object that will be invoked for each element in the current set. */ map(callback: (index: number, domElement: Element) => any): JQuery; /** * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector. - * + * * @param selector A string containing a selector expression to match elements against. */ next(selector?: string): JQuery; /** * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ nextAll(selector?: string): JQuery; /** * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * + * * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements. * @param filter A string containing a selector expression to match elements against. */ nextUntil(selector?: string, filter?: string): JQuery; /** * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * + * * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements. * @param filter A string containing a selector expression to match elements against. */ nextUntil(element?: Element, filter?: string): JQuery; /** * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed. - * + * * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements. * @param filter A string containing a selector expression to match elements against. */ @@ -3087,25 +3087,25 @@ interface JQuery { /** * Remove elements from the set of matched elements. - * + * * @param selector A string containing a selector expression to match elements against. */ not(selector: string): JQuery; /** * Remove elements from the set of matched elements. - * + * * @param func A function used as a test for each element in the set. this is the current DOM element. */ not(func: (index: number, element: Element) => boolean): JQuery; /** * Remove elements from the set of matched elements. - * + * * @param elements One or more DOM elements to remove from the matched set. */ not(elements: Element|Element[]): JQuery; /** * Remove elements from the set of matched elements. - * + * * @param obj An existing jQuery object to match the current set of elements against. */ not(obj: JQuery): JQuery; @@ -3117,35 +3117,35 @@ interface JQuery { /** * Get the parent of each element in the current set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ parent(selector?: string): JQuery; /** * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ parents(selector?: string): JQuery; /** * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements. * @param filter A string containing a selector expression to match elements against. */ parentsUntil(selector?: string, filter?: string): JQuery; /** * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements. * @param filter A string containing a selector expression to match elements against. */ parentsUntil(element?: Element, filter?: string): JQuery; /** * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements. * @param filter A string containing a selector expression to match elements against. */ @@ -3153,35 +3153,35 @@ interface JQuery { /** * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ prev(selector?: string): JQuery; /** * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ prevAll(selector?: string): JQuery; /** * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements. * @param filter A string containing a selector expression to match elements against. */ prevUntil(selector?: string, filter?: string): JQuery; /** * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements. * @param filter A string containing a selector expression to match elements against. */ prevUntil(element?: Element, filter?: string): JQuery; /** * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object. - * + * * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements. * @param filter A string containing a selector expression to match elements against. */ @@ -3189,14 +3189,14 @@ interface JQuery { /** * Get the siblings of each element in the set of matched elements, optionally filtered by a selector. - * + * * @param selector A string containing a selector expression to match elements against. */ siblings(selector?: string): JQuery; /** * Reduce the set of matched elements to a subset specified by a range of indices. - * + * * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set. * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set. */ @@ -3204,32 +3204,32 @@ interface JQuery { /** * Show the queue of functions to be executed on the matched elements. - * + * * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. */ queue(queueName?: string): any[]; /** * Manipulate the queue of functions to be executed, once for each matched element. - * + * * @param newQueue An array of functions to replace the current queue contents. */ queue(newQueue: Function[]): JQuery; /** * Manipulate the queue of functions to be executed, once for each matched element. - * + * * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. */ queue(callback: Function): JQuery; /** * Manipulate the queue of functions to be executed, once for each matched element. - * + * * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @param newQueue An array of functions to replace the current queue contents. */ queue(queueName: string, newQueue: Function[]): JQuery; /** * Manipulate the queue of functions to be executed, once for each matched element. - * + * * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue. * @param callback The new function to add to the queue, with a function to call that will dequeue the next item. */ diff --git a/jsoneditor/jsoneditor.d.ts b/jsoneditor/jsoneditor.d.ts index ea68a751a4..175c295df6 100644 --- a/jsoneditor/jsoneditor.d.ts +++ b/jsoneditor/jsoneditor.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alejandro Sánchez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'jsoneditor' { export interface JSONEditorNode { diff --git a/jsoneditor/tsconfig.json b/jsoneditor/tsconfig.json new file mode 100644 index 0000000000..ac1de683cd --- /dev/null +++ b/jsoneditor/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "jsoneditor.d.ts", + "jsoneditor-tests.ts" + ] +} \ No newline at end of file diff --git a/jsuite/jsuite.d.ts b/jsuite/jsuite.d.ts index 2d32c88e68..0b00b0277d 100644 --- a/jsuite/jsuite.d.ts +++ b/jsuite/jsuite.d.ts @@ -3,8 +3,8 @@ // Definitions by: Darren Hill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// interface Iconfig { logging?: boolean; diff --git a/jsuite/tsconfig.json b/jsuite/tsconfig.json new file mode 100644 index 0000000000..0742f18c9f --- /dev/null +++ b/jsuite/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "jsuite.d.ts" + ] +} \ No newline at end of file diff --git a/karma-chai-sinon/karma-chai-sinon-tests.ts b/karma-chai-sinon/karma-chai-sinon-tests.ts new file mode 100644 index 0000000000..b60f5d278f --- /dev/null +++ b/karma-chai-sinon/karma-chai-sinon-tests.ts @@ -0,0 +1,4 @@ +should.not.equal(1, 2); +expect(1 === 1); +assert.isTrue(true); +sinon.spy(); diff --git a/karma-chai-sinon/karma-chai-sinon.d.ts b/karma-chai-sinon/karma-chai-sinon.d.ts index 059a1b80ef..4d44d0ce2d 100644 --- a/karma-chai-sinon/karma-chai-sinon.d.ts +++ b/karma-chai-sinon/karma-chai-sinon.d.ts @@ -3,10 +3,12 @@ // Definitions by: Václav Ostrožlík // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// -/// +/// +import Sinon = require("Sinon"); -declare var should: Chai.Should; -declare var expect: Chai.ExpectStatic; -declare var assert: Chai.AssertStatic; -declare var sinon: Sinon.SinonStatic; +declare global { + var should: Chai.Should; + var expect: Chai.ExpectStatic; + var assert: Chai.AssertStatic; + var sinon: Sinon.SinonStatic; +} diff --git a/karma-chai-sinon/tsconfig.json b/karma-chai-sinon/tsconfig.json new file mode 100644 index 0000000000..aef2986498 --- /dev/null +++ b/karma-chai-sinon/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "karma-chai-sinon.d.ts", + "karma-chai-sinon-tests.ts" + ] +} \ No newline at end of file diff --git a/koa-compress/koa-compress-tests.ts b/koa-compress/koa-compress-tests.ts index 564fd53e2c..30195cd30c 100644 --- a/koa-compress/koa-compress-tests.ts +++ b/koa-compress/koa-compress-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as Koa from "koa"; import compress = require("koa-compress"); diff --git a/koa-compress/koa-compress.d.ts b/koa-compress/koa-compress.d.ts index 49a0bb5f1b..d66cd14df4 100644 --- a/koa-compress/koa-compress.d.ts +++ b/koa-compress/koa-compress.d.ts @@ -12,8 +12,8 @@ app.use(compress()); =============================================== */ -/// -/// +/// +/// declare module "koa-compress" { @@ -31,7 +31,7 @@ declare module "koa-compress" { */ threshold?: number } - + /** * Compress middleware for Koa */ diff --git a/koa-compress/tsconfig.json b/koa-compress/tsconfig.json new file mode 100644 index 0000000000..05c84b0a3a --- /dev/null +++ b/koa-compress/tsconfig.json @@ -0,0 +1,19 @@ +{ + "files": [ + "koa-compress.d.ts", + "koa-compress-tests.ts" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} \ No newline at end of file diff --git a/koa-hbs/koa-hbs-tests.ts b/koa-hbs/koa-hbs-tests.ts index 373c3ab8b9..647eee7f22 100644 --- a/koa-hbs/koa-hbs-tests.ts +++ b/koa-hbs/koa-hbs-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as Hbs from 'koa-hbs'; import * as Koa from 'koa'; import * as Path from 'path'; diff --git a/koa-hbs/koa-hbs.d.ts b/koa-hbs/koa-hbs.d.ts index cd8fc9c5b4..8adfeaf20f 100644 --- a/koa-hbs/koa-hbs.d.ts +++ b/koa-hbs/koa-hbs.d.ts @@ -23,7 +23,7 @@ =============================================== */ -/// +/// declare module "koa-hbs" { @@ -40,7 +40,7 @@ declare module "koa-hbs" { layoutsPath?: string, contentHelperName?: string, blockHelperName?: string, - disableCache?: boolean + disableCache?: boolean } } diff --git a/koa-hbs/tsconfig.json b/koa-hbs/tsconfig.json new file mode 100644 index 0000000000..c20e3481c9 --- /dev/null +++ b/koa-hbs/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "koa-hbs.d.ts", + "koa-hbs-tests.ts" + ] +} \ No newline at end of file diff --git a/koa-json-error/index.d.ts b/koa-json-error/index.d.ts new file mode 100644 index 0000000000..cf45c1cc08 --- /dev/null +++ b/koa-json-error/index.d.ts @@ -0,0 +1,31 @@ +// Type definitions for koa-json-error v3.x +// Project: https://github.com/koajs/json-error +// Definitions by: Mudkip +// Definitions: https://github.com/mudkipme/DefinitelyTyped + +import * as Koa from "koa"; + +interface JSONErrorOptions { + /** + * Perform some task before calling `options.format`. Must be a function with the original err as its only argument. + */ + preFormat?: { (err: Error): any }; + + /** + * Runs inmediatly after `options.preFormat`. It receives two arguments: the original `err` and the output of `options.preFormat`. It should `return` a newly formatted error. + */ + format?: { (err: Error, obj: any): any }; + + /** + * Runs inmediatly after `options.format`. It receives two arguments: the original `err` and the output of `options.format`. It should `return` a newly formatted error. + */ + postFormat?: { (err: Error, obj: any): any }; +} + +/** + * Error handler for pure Koa 2.0.0+ JSON apps + */ +declare function jsonError(options?: JSONErrorOptions) : { (ctx: Koa.Context, next?: () => any): any }; + +declare namespace jsonError {} +export = jsonError; diff --git a/koa-json-error/koa-json-error-tests.ts b/koa-json-error/koa-json-error-tests.ts index 37aae696b0..07ac0fd129 100644 --- a/koa-json-error/koa-json-error-tests.ts +++ b/koa-json-error/koa-json-error-tests.ts @@ -1,7 +1,3 @@ -/// -/// -/// - import * as Koa from "koa"; import * as error from "koa-json-error"; import { assign } from "lodash"; diff --git a/koa-json-error/koa-json-error.d.ts b/koa-json-error/koa-json-error.d.ts deleted file mode 100644 index 491ead463e..0000000000 --- a/koa-json-error/koa-json-error.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Type definitions for koa-json-error v3.x -// Project: https://github.com/koajs/json-error -// Definitions by: Mudkip -// Definitions: https://github.com/mudkipme/DefinitelyTyped - -/// - -declare module "koa-json-error" { - - import * as Koa from "koa"; - - interface JSONErrorOptions { - /** - * Perform some task before calling `options.format`. Must be a function with the original err as its only argument. - */ - preFormat?: { (err: Error): any }; - - /** - * Runs inmediatly after `options.preFormat`. It receives two arguments: the original `err` and the output of `options.preFormat`. It should `return` a newly formatted error. - */ - format?: { (err: Error, obj: any): any }; - - /** - * Runs inmediatly after `options.format`. It receives two arguments: the original `err` and the output of `options.format`. It should `return` a newly formatted error. - */ - postFormat?: { (err: Error, obj: any): any }; - } - - /** - * Error handler for pure Koa 2.0.0+ JSON apps - */ - function jsonError(options?: JSONErrorOptions) : { (ctx: Koa.Context, next?: () => any): any }; - - namespace jsonError {} - export = jsonError; -} \ No newline at end of file diff --git a/koa-json-error/tsconfig.json b/koa-json-error/tsconfig.json new file mode 100644 index 0000000000..92f9d5ce58 --- /dev/null +++ b/koa-json-error/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "koa-json-error-tests.ts" + ] +} \ No newline at end of file diff --git a/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts b/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts index c6519ab371..daf6d20bd6 100644 --- a/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts +++ b/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen-tests.ts @@ -1,6 +1,3 @@ -/// -/// - var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', osmAttrib = '© OpenStreetMap contributors', osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}), diff --git a/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen.d.ts b/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen.d.ts index 8809472e43..17c78c0837 100644 --- a/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen.d.ts +++ b/leaflet-geocoder-mapzen/leaflet-geocoder-mapzen.d.ts @@ -3,8 +3,7 @@ // Definitions by: Leonard Lausen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// +/// declare namespace L { namespace Control { diff --git a/leaflet-geocoder-mapzen/tsconfig.json b/leaflet-geocoder-mapzen/tsconfig.json new file mode 100644 index 0000000000..eb59fde803 --- /dev/null +++ b/leaflet-geocoder-mapzen/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "leaflet-geocoder-mapzen.d.ts", + "leaflet-geocoder-mapzen-tests.ts" + ] +} \ No newline at end of file diff --git a/libxslt/index.d.ts b/libxslt/index.d.ts new file mode 100644 index 0000000000..329525d7df --- /dev/null +++ b/libxslt/index.d.ts @@ -0,0 +1,59 @@ +// Type definitions for node-libxslt +// Project: https://github.com/albanm/node-libxslt +// Definitions by: Alejandro Sánchez +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as xmljs from 'libxmljs'; + +export const libxmljs: typeof xmljs; + +type OutputFormat = 'document' | 'string'; + +export interface ApplyOptions { + outputFormat?: OutputFormat; + noWrapParams?: boolean; +} + +type ApplyResult = string | xmljs.XMLDocument; + +type ApplyCallback = (err: Error, result: ApplyResult) => void; + +type ApplyStringCallback = (err: Error, result: string) => void; + +type ApplyDocumentCallback = (err: Error, result: xmljs.XMLDocument) => void; + +export interface Stylesheet { + apply(source: string, params?: Object): string; + + apply(source: string, params: Object, options: ApplyOptions): ApplyResult; + + apply(source: string, params: Object, options: ApplyOptions, callback: ApplyCallback): void; + + apply(source: string, callback: ApplyStringCallback): void; + + apply(source: xmljs.XMLDocument, params?: Object): xmljs.XMLDocument; + + apply(source: xmljs.XMLDocument, params: Object, options: ApplyOptions): ApplyResult; + + apply(source: xmljs.XMLDocument, params: Object, options: ApplyOptions, callback: ApplyCallback): void; + + apply(source: xmljs.XMLDocument, callback: ApplyDocumentCallback): void; + + applyToFile(sourcePath: string, params: Object, options: ApplyOptions, callback: ApplyStringCallback): void; + + applyToFile(sourcePath: string, callback: ApplyStringCallback): void; +} + +type ParseCallback = (err: Error, stylesheet: Stylesheet) => void; + +export function parse(source: string): Stylesheet; + +export function parse(source: string, callback: ParseCallback): void; + +export function parse(source: xmljs.XMLDocument): Stylesheet; + +export function parse(source: xmljs.XMLDocument, callback: ParseCallback): void; + +export function parseFile(sourcePath: string, callback: ParseCallback): void; diff --git a/libxslt/libxslt-tests.ts b/libxslt/libxslt-tests.ts index 544269b11e..bed54e5f52 100644 --- a/libxslt/libxslt-tests.ts +++ b/libxslt/libxslt-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as libxslt from 'libxslt'; import * as libxmljs from 'libxmljs'; diff --git a/libxslt/libxslt.d.ts b/libxslt/libxslt.d.ts deleted file mode 100644 index 0cfd4e1bcd..0000000000 --- a/libxslt/libxslt.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Type definitions for node-libxslt -// Project: https://github.com/albanm/node-libxslt -// Definitions by: Alejandro Sánchez -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module 'libxslt' { - import * as xmljs from 'libxmljs'; - - export const libxmljs: typeof xmljs; - - type OutputFormat = 'document' | 'string'; - - export interface ApplyOptions { - outputFormat?: OutputFormat; - noWrapParams?: boolean; - } - - type ApplyResult = string | xmljs.XMLDocument; - - type ApplyCallback = (err: Error, result: ApplyResult) => void; - - type ApplyStringCallback = (err: Error, result: string) => void; - - type ApplyDocumentCallback = (err: Error, result: xmljs.XMLDocument) => void; - - export interface Stylesheet { - apply(source: string, params?: Object): string; - - apply(source: string, params: Object, options: ApplyOptions): ApplyResult; - - apply(source: string, params: Object, options: ApplyOptions, callback: ApplyCallback): void; - - apply(source: string, callback: ApplyStringCallback): void; - - apply(source: xmljs.XMLDocument, params?: Object): xmljs.XMLDocument; - - apply(source: xmljs.XMLDocument, params: Object, options: ApplyOptions): ApplyResult; - - apply(source: xmljs.XMLDocument, params: Object, options: ApplyOptions, callback: ApplyCallback): void; - - apply(source: xmljs.XMLDocument, callback: ApplyDocumentCallback): void; - - applyToFile(sourcePath: string, params: Object, options: ApplyOptions, callback: ApplyStringCallback): void; - - applyToFile(sourcePath: string, callback: ApplyStringCallback): void; - } - - type ParseCallback = (err: Error, stylesheet: Stylesheet) => void; - - export function parse(source: string): Stylesheet; - - export function parse(source: string, callback: ParseCallback): void; - - export function parse(source: xmljs.XMLDocument): Stylesheet; - - export function parse(source: xmljs.XMLDocument, callback: ParseCallback): void; - - export function parseFile(sourcePath: string, callback: ParseCallback): void; -} diff --git a/libxslt/tsconfig.json b/libxslt/tsconfig.json new file mode 100644 index 0000000000..bcc8d2d059 --- /dev/null +++ b/libxslt/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "libxslt-tests.ts" + ] +} \ No newline at end of file diff --git a/marker-animate-unobtrusive/marker-animate-unobtrusive-amd-tests.ts b/marker-animate-unobtrusive/marker-animate-unobtrusive-amd-tests.ts index 544c95af5a..f86619fc90 100644 --- a/marker-animate-unobtrusive/marker-animate-unobtrusive-amd-tests.ts +++ b/marker-animate-unobtrusive/marker-animate-unobtrusive-amd-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import SlidingMarker = require('SlidingMarker'); import MarkerWithGhost = require('MarkerWithGhost'); diff --git a/marker-animate-unobtrusive/marker-animate-unobtrusive-tests.ts b/marker-animate-unobtrusive/marker-animate-unobtrusive-tests.ts index 73ad4da4b5..d2effcf94d 100644 --- a/marker-animate-unobtrusive/marker-animate-unobtrusive-tests.ts +++ b/marker-animate-unobtrusive/marker-animate-unobtrusive-tests.ts @@ -1,6 +1,3 @@ -/// -/// - function test_init() { SlidingMarker.initializeGlobally(); MarkerWithGhost.initializeGlobally(); @@ -43,7 +40,7 @@ function test_marker_with_ghost() { var g = new MarkerWithGhost(); slidingMarker = g; - + g.setGhostPosition(p); p = g.getGhostPosition(); p = g.getGhostAnimationPosition(); diff --git a/marker-animate-unobtrusive/marker-animate-unobtrusive.d.ts b/marker-animate-unobtrusive/marker-animate-unobtrusive.d.ts index 61a4a680df..0be3d83c8a 100644 --- a/marker-animate-unobtrusive/marker-animate-unobtrusive.d.ts +++ b/marker-animate-unobtrusive/marker-animate-unobtrusive.d.ts @@ -3,7 +3,7 @@ // Definitions by: Roman Viskin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace jQuery.easing { type IEasingType = diff --git a/marker-animate-unobtrusive/tsconfig.json b/marker-animate-unobtrusive/tsconfig.json new file mode 100644 index 0000000000..3961120707 --- /dev/null +++ b/marker-animate-unobtrusive/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "marker-animate-unobtrusive.d.ts", + "marker-animate-unobtrusive-tests.ts", + "marker-animate-unobtrusive-amd-tests.ts" + ] +} \ No newline at end of file diff --git a/masonry-layout/masonry-layout.d.ts b/masonry-layout/masonry-layout.d.ts index a76796096b..41753358c9 100644 --- a/masonry-layout/masonry-layout.d.ts +++ b/masonry-layout/masonry-layout.d.ts @@ -1,42 +1,42 @@ -// Type definitions for Masonry 4.0.0 -// Project: https://github.com/desandro/masonry +// Type definitions for Masonry 4.0.0 +// Project: https://github.com/desandro/masonry // Definitions by: Mark Wilson -// Definitions: https://github.com/borisyankov/DefinitelyTyped +// Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// -// Modified from original definitions by: +// Modified from original definitions by: // Travis Brown < https://github.com/warriorrocker> declare module Masonry { - class Masonry implements MasonryGrid { - constructor(options?: MasonryOptions); - constructor(selector: string, options?: MasonryOptions); - } + class Masonry implements MasonryGrid { + constructor(options?: MasonryOptions); + constructor(selector: string, options?: MasonryOptions); + } interface MasonryGrid { masonry?(): void; masonry?(eventName: string, listener: any): void; - // layout + // layout layout?(): void; layoutItems?(items: Array, isStill?: boolean): void; stamp?(elements: Array): void; unstamp?(elements: Array): void; - // add and remove items + // add and remove items appended?(elements: Array): void; prepended?(elements: Array): void; addItems?(elements: Array): void; remove?(elements: Array): void; - // events + // events on?(eventName: string, listener: any): void; off?(eventName: string, listener: any): void; once?(eventName: string, listener: any): void; - // utilities + // utilities reloadItems?(): void; destroy?(): void; getItemElements?(): Array; @@ -45,7 +45,7 @@ declare module Masonry { interface MasonryOptions { - // layout + // layout itemSelector?: string; columnWidth?: any; percentPosition?: boolean; @@ -55,7 +55,7 @@ declare module Masonry { originLeft?: boolean; originTop?: boolean; - // setup + // setup containerStyle?: Object; transitionDuration?: any; resize?: boolean; diff --git a/masonry-layout/tsconfig.json b/masonry-layout/tsconfig.json new file mode 100644 index 0000000000..0638ecd09d --- /dev/null +++ b/masonry-layout/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "masonry-layout.d.ts", + "masonry-layout-tests.ts" + ] +} \ No newline at end of file diff --git a/mitm/mitm-tests.ts b/mitm/mitm-tests.ts index 00abe30b1a..e528cf86cb 100644 --- a/mitm/mitm-tests.ts +++ b/mitm/mitm-tests.ts @@ -1,5 +1,3 @@ -/// - import Mitm = require('mitm'); const mitm = Mitm(); diff --git a/mitm/mitm.d.ts b/mitm/mitm.d.ts index 2c5f03f8bc..0cd0d32aeb 100644 --- a/mitm/mitm.d.ts +++ b/mitm/mitm.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alejandro Sánchez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'mitm' { import * as http from 'http'; @@ -11,10 +11,10 @@ declare module 'mitm' { interface SocketOptions { port: number; - host?: string; + host?: string; localAddress?: string; - localPort?: string; - family?: number; + localPort?: string; + family?: number; allowHalfOpen?: boolean; } @@ -25,7 +25,7 @@ declare module 'mitm' { type SocketConnectCallback = (socket: BypassableSocket, opts: SocketOptions) => void; type SocketConnectionCallback = (socket: net.Socket, opts: SocketOptions) => void; - + type HttpCallback = (request: http.IncomingMessage, response: http.ServerResponse) => void; type Event = 'connect' | 'connection' | 'request'; diff --git a/mitm/tsconfig.json b/mitm/tsconfig.json new file mode 100644 index 0000000000..e14e440597 --- /dev/null +++ b/mitm/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "mitm.d.ts", + "mitm-tests.ts" + ] +} \ No newline at end of file diff --git a/mongoose-paginate/mongoose-paginate-tests.ts b/mongoose-paginate/mongoose-paginate-tests.ts index 42fc42be69..d541c44da8 100644 --- a/mongoose-paginate/mongoose-paginate-tests.ts +++ b/mongoose-paginate/mongoose-paginate-tests.ts @@ -1,6 +1,4 @@ -/// -/// -/// +/// /** * Created by Linus Brolin . diff --git a/mongoose-paginate/mongoose-paginate.d.ts b/mongoose-paginate/mongoose-paginate.d.ts index ed8b07a2fa..6b06c65ac5 100644 --- a/mongoose-paginate/mongoose-paginate.d.ts +++ b/mongoose-paginate/mongoose-paginate.d.ts @@ -3,7 +3,7 @@ // Definitions by: Linus Brolin , simonxca // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'mongoose' { export interface PaginateOptions { diff --git a/mongoose-paginate/tsconfig.json b/mongoose-paginate/tsconfig.json new file mode 100644 index 0000000000..6cd106d699 --- /dev/null +++ b/mongoose-paginate/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "mongoose-paginate.d.ts", + "mongoose-paginate-tests.ts" + ] +} \ No newline at end of file diff --git a/multer-s3/multer-s3-tests.ts b/multer-s3/multer-s3-tests.ts index 2b761238f7..413ba6e313 100644 --- a/multer-s3/multer-s3-tests.ts +++ b/multer-s3/multer-s3-tests.ts @@ -1,5 +1,3 @@ -/// - "use strict"; let accessKeyId: string diff --git a/multer-s3/multer-s3.d.ts b/multer-s3/multer-s3.d.ts index 1844f3decd..1c1aa792c1 100644 --- a/multer-s3/multer-s3.d.ts +++ b/multer-s3/multer-s3.d.ts @@ -3,8 +3,8 @@ // Definitions by: KIM Jaesuck a.k.a. gim tcaesvk // Definitions: https://github.com/DefinitelyType/DefinitelyTyped -/// -/// +/// +/// declare module "multer-s3" { import * as AWS from "aws-sdk" diff --git a/multer-s3/tsconfig.json b/multer-s3/tsconfig.json new file mode 100644 index 0000000000..04e16429ee --- /dev/null +++ b/multer-s3/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "multer-s3.d.ts", + "multer-s3-tests.ts" + ] +} \ No newline at end of file diff --git a/multer/index.d.ts b/multer/index.d.ts index 761a8dce49..2437f498db 100644 --- a/multer/index.d.ts +++ b/multer/index.d.ts @@ -81,34 +81,36 @@ declare var multer: Multer; export = multer; -declare namespace Express { - export interface Request { - file: Multer.File; - files: { - [fieldname: string]: Multer.File[]; - }; - } +declare global { + namespace Express { + export interface Request { + file: Multer.File; + files: { + [fieldname: string]: Multer.File[]; + }; + } - namespace Multer { - export interface File { - /** Field name specified in the form */ - fieldname: string; - /** Name of the file on the user's computer */ - originalname: string; - /** Encoding type of the file */ - encoding: string; - /** Mime type of the file */ - mimetype: string; - /** Size of the file in bytes */ - size: number; - /** The folder to which the file has been saved (DiskStorage) */ - destination: string; - /** The name of the file within the destination (DiskStorage) */ - filename: string; - /** Location of the uploaded file (DiskStorage) */ - path: string; - /** A Buffer of the entire file (MemoryStorage) */ - buffer: Buffer; + namespace Multer { + export interface File { + /** Field name specified in the form */ + fieldname: string; + /** Name of the file on the user's computer */ + originalname: string; + /** Encoding type of the file */ + encoding: string; + /** Mime type of the file */ + mimetype: string; + /** Size of the file in bytes */ + size: number; + /** The folder to which the file has been saved (DiskStorage) */ + destination: string; + /** The name of the file within the destination (DiskStorage) */ + filename: string; + /** Location of the uploaded file (DiskStorage) */ + path: string; + /** A Buffer of the entire file (MemoryStorage) */ + buffer: Buffer; + } } } -} +} \ No newline at end of file diff --git a/musicmetadata/musicmetadata-tests.ts b/musicmetadata/musicmetadata-tests.ts index bc99ba0900..421aec3bc5 100644 --- a/musicmetadata/musicmetadata-tests.ts +++ b/musicmetadata/musicmetadata-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as fs from "fs"; import * as mm from "musicmetadata"; diff --git a/musicmetadata/musicmetadata.d.ts b/musicmetadata/musicmetadata.d.ts index 0e951f8d08..c1ff45741f 100644 --- a/musicmetadata/musicmetadata.d.ts +++ b/musicmetadata/musicmetadata.d.ts @@ -3,7 +3,7 @@ // Definitions by: Xavier Stouder // Definitions: https://github.com/DefinitelyTyped/ -/// +/// declare module "musicmetadata" { import {Readable} from "stream"; diff --git a/musicmetadata/tsconfig.json b/musicmetadata/tsconfig.json new file mode 100644 index 0000000000..d403132a8d --- /dev/null +++ b/musicmetadata/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "musicmetadata.d.ts", + "musicmetadata-tests.ts" + ] +} \ No newline at end of file diff --git a/nes/nes-tests.ts b/nes/nes-tests.ts index d56b42a8c4..effe4e6c94 100644 --- a/nes/nes-tests.ts +++ b/nes/nes-tests.ts @@ -1,5 +1,3 @@ -/// - import Hapi = require('hapi'); import Nes = require('nes'); @@ -29,8 +27,8 @@ server.register(Nes, (regErr: any) => { } else { setTimeout(() => { wsServer.publish('/item/5', { id: 5, status: 'complete' }); - wsServer.publish('/item/6', { id: 6, status: 'initial' }); - }, 100); + wsServer.publish('/item/6', { id: 6, status: 'initial' }); + }, 100); } }); } diff --git a/nes/nes.d.ts b/nes/nes.d.ts index c86627db47..f6159be9b0 100644 --- a/nes/nes.d.ts +++ b/nes/nes.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ivo Stratev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'nes' { import Hapi = require('hapi'); diff --git a/nes/tsconfig.json b/nes/tsconfig.json new file mode 100644 index 0000000000..c0b45f689b --- /dev/null +++ b/nes/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "nes.d.ts", + "nes-tests.ts" + ] +} \ No newline at end of file diff --git a/ngmap/ngmap-tests.ts b/ngmap/ngmap-tests.ts index f1909a2b1b..b78ff9071a 100644 --- a/ngmap/ngmap-tests.ts +++ b/ngmap/ngmap-tests.ts @@ -1,4 +1,3 @@ -/// class NgMapTestController { constructor(public $scope: ng.IScope, public $window: ng.IWindowService, public NgMap: angular.map.INgMap) { this.showMap(); @@ -17,9 +16,9 @@ app.config(function(NgMapProvider: angular.map.INgMapProvider) { NgMapProvider.setDefaultOptions({ marker: { optimized: false - } + } }); }); -app.controller('testCtrl', ['$scope', '$window', 'ngMap', +app.controller('testCtrl', ['$scope', '$window', 'ngMap', ($scope: ng.IScope, $window: ng.IWindowService, NgMap: angular.map.INgMap) => new NgMapTestController($scope, $window, NgMap)]); \ No newline at end of file diff --git a/ngmap/ngmap.d.ts b/ngmap/ngmap.d.ts index 38c237abd1..23e596c88e 100644 --- a/ngmap/ngmap.d.ts +++ b/ngmap/ngmap.d.ts @@ -3,8 +3,8 @@ // Definitions by: Niko Kovačič // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "ngmap" { let _: string; @@ -45,7 +45,7 @@ declare namespace angular.map { */ icon?: string|google.maps.Icon|google.maps.Symbol; /** - * Adds a label to the marker. The label can either be a string, or a MarkerLabel object. + * Adds a label to the marker. The label can either be a string, or a MarkerLabel object. * Only the first character of the string will be displayed. * @type {string} */ @@ -94,7 +94,7 @@ declare namespace angular.map { addMap(mapCtrl: Function | any[]): void; /** * Delete map from pool - * @param {Function | any[]} mapCtrl Map controller optional. Defaults to last + * @param {Function | any[]} mapCtrl Map controller optional. Defaults to last * controller in pool */ deleteMap(mapCtrl?: Function | any[]): void; @@ -104,13 +104,13 @@ declare namespace angular.map { * @param {PositionOptions} options optional * @return {angular.IPromise} Latitude ang longitude of the address */ - getGeoLocation(address: string, options?: PositionOptions): angular.IPromise + getGeoLocation(address: string, options?: PositionOptions): ng.IPromise /** * Get map from the pool of all shown maps. * @param {IGetMapOptions} options optional * @return {angular.IPromise} promise */ - getMap(options?: IGetMapOptions): angular.IPromise + getMap(options?: IGetMapOptions): ng.IPromise /** * Initialize map from mapId or the current first shown map * @param {string} mapId id of the map. default 0 @@ -123,7 +123,7 @@ declare namespace angular.map { * @param {Object} object a Google maps object to be changed * @return {IObserveAndSetFunc} attribute obvserve function */ - observeAndSet(attrName: string, object: Object): IObserveAndSetFunc; + observeAndSet(attrName: string, object: Object): IObserveAndSetFunc; /** * Set display, width, height of map container element * @param {HTMLElement} el map container element diff --git a/ngmap/tsconfig.json b/ngmap/tsconfig.json new file mode 100644 index 0000000000..d86f53d20a --- /dev/null +++ b/ngmap/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "ngmap.d.ts", + "ngmap-tests.ts" + ] +} \ No newline at end of file diff --git a/ngreact/ngreact-tests.tsx b/ngreact/ngreact-tests.tsx index 013e3f2f6b..46980dab1f 100644 --- a/ngreact/ngreact-tests.tsx +++ b/ngreact/ngreact-tests.tsx @@ -1,6 +1,4 @@ -/// -/// - +import * as angular from "angular"; import * as React from "react"; import { ReactDirective } from "ngreact"; @@ -22,7 +20,7 @@ app.directive('hello', function(reactDirective: ReactDirective) { return reactDirective(HelloComponent, undefined, {restrict: 'C'}); }); -app.directive('helloComponent', function(reactDirective: ReactDirective, $location: ng.ILocationService) { +app.directive('helloComponent', function(reactDirective: ReactDirective, $location: angular.ILocationService) { return reactDirective(HelloComponent, undefined, {}, { $location }); }); diff --git a/ngreact/ngreact.d.ts b/ngreact/ngreact.d.ts index 9c3ecbec11..f9df0f694f 100644 --- a/ngreact/ngreact.d.ts +++ b/ngreact/ngreact.d.ts @@ -3,11 +3,11 @@ // Definitions by: Vicky Lai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "ngreact" { - type ReactDirective = (reactComponentName: string | __React.ComponentClass, + type ReactDirective = (reactComponentName: string | React.ComponentClass, propNames?: string[], conf?: Object, injectableProps?: Object) => angular.IDirective; diff --git a/ngreact/tsconfig.json b/ngreact/tsconfig.json new file mode 100644 index 0000000000..1b80eaf055 --- /dev/null +++ b/ngreact/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "ngreact.d.ts", + "ngreact-tests.tsx" + ] +} \ No newline at end of file diff --git a/node-usb/node-usb-tests.ts b/node-usb/node-usb-tests.ts index 9abef86ee8..85da346172 100644 --- a/node-usb/node-usb-tests.ts +++ b/node-usb/node-usb-tests.ts @@ -1,5 +1,3 @@ -/// - import * as usb from "usb"; const device = new usb.Device(); diff --git a/node-usb/node-usb.d.ts b/node-usb/node-usb.d.ts index b8d1611a51..78b93bbfd9 100644 --- a/node-usb/node-usb.d.ts +++ b/node-usb/node-usb.d.ts @@ -3,7 +3,7 @@ // Definitions by: Eric Brody // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module "usb" { diff --git a/node-usb/tsconfig.json b/node-usb/tsconfig.json new file mode 100644 index 0000000000..8b33ce72d6 --- /dev/null +++ b/node-usb/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "node-usb.d.ts", + "node-usb-tests.ts" + ] +} \ No newline at end of file diff --git a/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts b/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts index 1cbd06929b..c2135c2ec6 100644 --- a/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts +++ b/nodemailer-ses-transport/nodemailer-ses-transport-tests.ts @@ -1,7 +1,5 @@ -/// -/// - import * as AWS from 'aws-sdk'; +import * as nodemailer from "nodemailer"; import * as sesTransport from 'nodemailer-ses-transport'; var opts: sesTransport.SesOptions = { diff --git a/nodemailer-ses-transport/nodemailer-ses-transport.d.ts b/nodemailer-ses-transport/nodemailer-ses-transport.d.ts index 8ce3d88d69..3ae0911fce 100644 --- a/nodemailer-ses-transport/nodemailer-ses-transport.d.ts +++ b/nodemailer-ses-transport/nodemailer-ses-transport.d.ts @@ -3,12 +3,9 @@ // Definitions by: Seth Westphal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - declare module "nodemailer-ses-transport" { - import * as AWS from 'aws-sdk'; + import * as nodemailer from "nodemailer"; namespace sesTransport { export interface SesOptions { diff --git a/nodemailer-ses-transport/tsconfig.json b/nodemailer-ses-transport/tsconfig.json new file mode 100644 index 0000000000..8aa631bf9a --- /dev/null +++ b/nodemailer-ses-transport/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "nodemailer-ses-transport.d.ts", + "nodemailer-ses-transport-tests.ts" + ] +} \ No newline at end of file diff --git a/notify.js/notify.js.d.ts b/notify.js/notify.js.d.ts index 49fd3415ec..4ba66fa2d0 100644 --- a/notify.js/notify.js.d.ts +++ b/notify.js/notify.js.d.ts @@ -3,129 +3,127 @@ // Definitions by: Bahman Nikkhahan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// -declare namespace NotifyJS { - interface NotificationOptions { - // whether to hide the notification on click - clickToHide: boolean; - // whether to auto-hide the notification - autoHide: boolean; - // if autoHide, hide after milliseconds - autoHideDelay: number; - // show the arrow pointing at the element - arrowShow: boolean; - // arrow size in pixels - arrowSize: number; - // position defines the notification position though uses the defaults below - position: string; - // default positions - elementPosition: string; - globalPosition: string; - // default style - style: string; - // default class (string or [string]) - className: string; - // show animation - showAnimation: string; - // show animation duration - showDuration: number; - // hide animation - hideAnimation: string; - // hide animation duration - hideDuration: number; - // padding between element and notification - gap: number; - } - - interface JQueryStaticNotify { - /** - * notify user - * @param element a jquery element - * @param notificationdata global notification data - * @param options notification options - */ - (element?: any, notificationdata?: any, options?: NotificationOptions): JQueryStatic; - - /** - * Add style - * @param styleName style name - * @param styleDefinition style definition object - */ - addStyle(styleName: string, styleDefinition: any): any; - - /** - * Remove style - * @param styleName style name - */ - removeStyle(styleName: string): any; - - /** - * Get style - * @param styleName style name - */ - getStyle(styleName: string): any; - - /** - * Insert css - * @param cssText css text to insert - */ - insertCSS(cssText: string): any; - - /** - * Set defaults for notifications - * @param options notification iptions - */ - defaults(options: NotificationOptions): any; - } - - interface JQueryStatic { - notify: JQueryStaticNotify; - } - - interface JQueryNotify { - /** - * notify user - * @param element a jquery element - * @param notificationdata global notification data - * @param options notification options - */ - (element?: any, notificationdata?: any, options?: NotificationOptions): JQuery; - - /** - * Add style - * @param styleName style name - * @param styleDefinition style definition object - */ - addStyle(styleName: string, styleDefinition: any): any; - - /** - * Remove style - * @param styleName style name - */ - removeStyle(styleName: string): any; - - /** - * Get style - * @param styleName style name - */ - getStyle(styleName: string): any; - - /** - * Insert css - * @param cssText css text to insert - */ - insertCSS(cssText: string): any; - - /** - * Set defaults for notifications - * @param options notification iptions - */ - defaults(options: NotificationOptions): any; - - } - - interface JQuery { - notify: JQueryStaticNotify; - } +interface NotificationOptions { + // whether to hide the notification on click + clickToHide: boolean; + // whether to auto-hide the notification + autoHide: boolean; + // if autoHide, hide after milliseconds + autoHideDelay: number; + // show the arrow pointing at the element + arrowShow: boolean; + // arrow size in pixels + arrowSize: number; + // position defines the notification position though uses the defaults below + position: string; + // default positions + elementPosition: string; + globalPosition: string; + // default style + style: string; + // default class (string or [string]) + className: string; + // show animation + showAnimation: string; + // show animation duration + showDuration: number; + // hide animation + hideAnimation: string; + // hide animation duration + hideDuration: number; + // padding between element and notification + gap: number; +} + +interface JQueryStaticNotify { + /** + * notify user + * @param element a jquery element + * @param notificationdata global notification data + * @param options notification options + */ + (element?: any, notificationdata?: any, options?: NotificationOptions): JQueryStatic; + + /** + * Add style + * @param styleName style name + * @param styleDefinition style definition object + */ + addStyle(styleName: string, styleDefinition: any): any; + + /** + * Remove style + * @param styleName style name + */ + removeStyle(styleName: string): any; + + /** + * Get style + * @param styleName style name + */ + getStyle(styleName: string): any; + + /** + * Insert css + * @param cssText css text to insert + */ + insertCSS(cssText: string): any; + + /** + * Set defaults for notifications + * @param options notification iptions + */ + defaults(options: NotificationOptions): any; +} + +interface JQueryStatic { + notify: JQueryStaticNotify; +} + +interface JQueryNotify { + /** + * notify user + * @param element a jquery element + * @param notificationdata global notification data + * @param options notification options + */ + (element?: any, notificationdata?: any, options?: NotificationOptions): JQuery; + + /** + * Add style + * @param styleName style name + * @param styleDefinition style definition object + */ + addStyle(styleName: string, styleDefinition: any): any; + + /** + * Remove style + * @param styleName style name + */ + removeStyle(styleName: string): any; + + /** + * Get style + * @param styleName style name + */ + getStyle(styleName: string): any; + + /** + * Insert css + * @param cssText css text to insert + */ + insertCSS(cssText: string): any; + + /** + * Set defaults for notifications + * @param options notification iptions + */ + defaults(options: NotificationOptions): any; + +} + +interface JQuery { + notify: JQueryStaticNotify; } diff --git a/notify.js/notify.js.tests.ts b/notify.js/notify.js.tests.ts index 505f3c4ec5..c824a6b37b 100644 --- a/notify.js/notify.js.tests.ts +++ b/notify.js/notify.js.tests.ts @@ -1,7 +1,4 @@ -/// -/// - -// setting defaults for notification plugin +// setting defaults for notification plugin $.notify.defaults({ clickToHide: true, autoHide: false, diff --git a/notify.js/tsconfig.json b/notify.js/tsconfig.json new file mode 100644 index 0000000000..1c62932129 --- /dev/null +++ b/notify.js/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "notify.js.d.ts", + "notify.js.tests.ts" + ] +} \ No newline at end of file diff --git a/nw.js/nw.js-tests.ts b/nw.js/nw.js-tests.ts index 585b7ebe3c..2efee35caa 100644 --- a/nw.js/nw.js-tests.ts +++ b/nw.js/nw.js-tests.ts @@ -1,4 +1,3 @@ -/// /* * nw.App Tests */ diff --git a/nw.js/nw.js.d.ts b/nw.js/nw.js.d.ts index 901d6743f2..7db945dcf6 100644 --- a/nw.js/nw.js.d.ts +++ b/nw.js/nw.js.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alireza Dabiri Nejad // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /** * Helpers class and interfaces defined here, to make `nw` module cleaner. diff --git a/nw.js/tsconfig.json b/nw.js/tsconfig.json new file mode 100644 index 0000000000..63803a69d9 --- /dev/null +++ b/nw.js/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "nw.js.d.ts", + "nw.js-tests.ts" + ] +} \ No newline at end of file diff --git a/o.js/o.js-tests.ts b/o.js/o.js-tests.ts index b9ffc1b065..f40a84ac84 100644 --- a/o.js/o.js-tests.ts +++ b/o.js/o.js-tests.ts @@ -1,6 +1,5 @@ -/// - import * as o from 'o.js'; +import * as Q from "q"; interface Product { ID : number; diff --git a/o.js/o.js.d.ts b/o.js/o.js.d.ts index d0d53dce88..eaa6732c40 100644 --- a/o.js/o.js.d.ts +++ b/o.js/o.js.d.ts @@ -3,7 +3,7 @@ // Definitions by: Matteo Antony Mistretta , Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'o.js' { interface Options { @@ -29,7 +29,7 @@ declare module 'o.js' { get(callback ?: (data : T) => void) : Q.Promise> save(callback ?: (data : T) => void) : Q.Promise> - + post(params : any) : OHandler patch(params : any) : OHandler put(params : any) : OHandler @@ -38,7 +38,7 @@ declare module 'o.js' { routes(path : string, callback ?: (data : T) => void) : OHandler route(path : string, callback ?: (data : T) => void) : OHandler triggerRoute(hash : string) : OHandler - beforeRouting(callback : (routeParams : any) => boolean) : OHandler + beforeRouting(callback : (routeParams : any) => boolean) : OHandler isEndpoint() : boolean loading(startFn : () => any | boolean, endFn : () => any) : OHandler diff --git a/o.js/tsconfig.json b/o.js/tsconfig.json new file mode 100644 index 0000000000..a630e4dee7 --- /dev/null +++ b/o.js/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "o.js.d.ts", + "o.js-tests.ts" + ] +} \ No newline at end of file diff --git a/passport-local-mongoose/passport-local-mongoose-tests.ts b/passport-local-mongoose/passport-local-mongoose-tests.ts index dcdf08bbe3..7b428561fe 100644 --- a/passport-local-mongoose/passport-local-mongoose-tests.ts +++ b/passport-local-mongoose/passport-local-mongoose-tests.ts @@ -1,8 +1,4 @@ -/// -/// -/// -/// -/// +/// /** * Created by Linus Brolin . diff --git a/passport-local-mongoose/passport-local-mongoose.d.ts b/passport-local-mongoose/passport-local-mongoose.d.ts index ab2539a709..9fafdd2f58 100644 --- a/passport-local-mongoose/passport-local-mongoose.d.ts +++ b/passport-local-mongoose/passport-local-mongoose.d.ts @@ -3,8 +3,8 @@ // Definitions by: Linus Brolin , simonxca // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module 'mongoose' { import passportLocal = require('passport-local'); diff --git a/passport-local-mongoose/tsconfig.json b/passport-local-mongoose/tsconfig.json new file mode 100644 index 0000000000..96c1a13bf1 --- /dev/null +++ b/passport-local-mongoose/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "passport-local-mongoose.d.ts", + "passport-local-mongoose-tests.ts" + ] +} \ No newline at end of file diff --git a/pg-pool/pg-pool.d.ts b/pg-pool/pg-pool.d.ts index d25f5a9bb6..e0886d7c52 100644 --- a/pg-pool/pg-pool.d.ts +++ b/pg-pool/pg-pool.d.ts @@ -3,7 +3,7 @@ // Definitions by: Leo Liang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "pg-pool" { export {Pool, PoolConfig} from "pg"; diff --git a/pg-pool/tsconfig.json b/pg-pool/tsconfig.json new file mode 100644 index 0000000000..f7319af50a --- /dev/null +++ b/pg-pool/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "pg-pool.d.ts", + "pg-pool-tests.ts" + ] +} \ No newline at end of file diff --git a/pino/pino-tests.ts b/pino/pino-tests.ts index 4a1470db24..f6c308a706 100644 --- a/pino/pino-tests.ts +++ b/pino/pino-tests.ts @@ -1,5 +1,3 @@ -/// // only for require() -/// // This contains all of the code from the docs on https://www.npmjs.com/package/pino import PINO = require('pino') diff --git a/pino/pino.d.ts b/pino/pino.d.ts index 0a51c49275..9b4ec6d503 100644 --- a/pino/pino.d.ts +++ b/pino/pino.d.ts @@ -3,7 +3,7 @@ // Definitions by: Peter Snider // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// // only for require() +/// declare module 'pino' { diff --git a/pino/tsconfig.json b/pino/tsconfig.json new file mode 100644 index 0000000000..d1c0f04972 --- /dev/null +++ b/pino/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "pino.d.ts", + "pino-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown.d.ts b/pouchdb-adapter-fruitdown/index.d.ts similarity index 93% rename from pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown.d.ts rename to pouchdb-adapter-fruitdown/index.d.ts index e818121543..e1323d55bf 100644 --- a/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown.d.ts +++ b/pouchdb-adapter-fruitdown/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace FruitDOWNAdapter { diff --git a/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts b/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts index ee6f70c59b..810cdc32c1 100644 --- a/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts +++ b/pouchdb-adapter-fruitdown/pouchdb-adapter-fruitdown-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterFruitdownTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-adapter-fruitdown/tsconfig.json b/pouchdb-adapter-fruitdown/tsconfig.json new file mode 100644 index 0000000000..013f05d069 --- /dev/null +++ b/pouchdb-adapter-fruitdown/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-fruitdown-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-http/pouchdb-adapter-http.d.ts b/pouchdb-adapter-http/index.d.ts similarity index 93% rename from pouchdb-adapter-http/pouchdb-adapter-http.d.ts rename to pouchdb-adapter-http/index.d.ts index f1a535be5e..44eeb955ac 100644 --- a/pouchdb-adapter-http/pouchdb-adapter-http.d.ts +++ b/pouchdb-adapter-http/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace HttpAdapter { diff --git a/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts b/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts index bbd1b5ec69..6d1c41a8a4 100644 --- a/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts +++ b/pouchdb-adapter-http/pouchdb-adapter-http-tests.ts @@ -1,6 +1,3 @@ -/// -/// - function testHttpDbCreation() { const basicDB = new PouchDB('basic', { adapter: 'http' diff --git a/pouchdb-adapter-http/tsconfig.json b/pouchdb-adapter-http/tsconfig.json new file mode 100644 index 0000000000..4f8d324b1b --- /dev/null +++ b/pouchdb-adapter-http/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-http-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-idb/pouchdb-adapter-idb.d.ts b/pouchdb-adapter-idb/index.d.ts similarity index 94% rename from pouchdb-adapter-idb/pouchdb-adapter-idb.d.ts rename to pouchdb-adapter-idb/index.d.ts index 34e75f6bdf..196739f486 100644 --- a/pouchdb-adapter-idb/pouchdb-adapter-idb.d.ts +++ b/pouchdb-adapter-idb/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace Core { diff --git a/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts b/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts index 2256bfc6bc..429a2f0483 100644 --- a/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts +++ b/pouchdb-adapter-idb/pouchdb-adapter-idb-tests.ts @@ -1,6 +1,3 @@ -/// -/// - function testIdbDbCreation() { const basicDB = new PouchDB('basic', { adapter: 'idb' diff --git a/pouchdb-adapter-idb/tsconfig.json b/pouchdb-adapter-idb/tsconfig.json new file mode 100644 index 0000000000..919e965de2 --- /dev/null +++ b/pouchdb-adapter-idb/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-idb-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb.d.ts b/pouchdb-adapter-leveldb/index.d.ts similarity index 93% rename from pouchdb-adapter-leveldb/pouchdb-adapter-leveldb.d.ts rename to pouchdb-adapter-leveldb/index.d.ts index fcdaaea65b..b335754619 100644 --- a/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb.d.ts +++ b/pouchdb-adapter-leveldb/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace LevelDbAdapter { diff --git a/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts b/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts index a9a66df854..72eb790e48 100644 --- a/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts +++ b/pouchdb-adapter-leveldb/pouchdb-adapter-leveldb-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterLevelDBTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-adapter-leveldb/tsconfig.json b/pouchdb-adapter-leveldb/tsconfig.json new file mode 100644 index 0000000000..2f59e471e3 --- /dev/null +++ b/pouchdb-adapter-leveldb/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-leveldb-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage.d.ts b/pouchdb-adapter-localstorage/index.d.ts similarity index 87% rename from pouchdb-adapter-localstorage/pouchdb-adapter-localstorage.d.ts rename to pouchdb-adapter-localstorage/index.d.ts index 92f9b17752..207cda4899 100644 --- a/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage.d.ts +++ b/pouchdb-adapter-localstorage/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace LocalStorageAdapter { - interface LocalStorageAdapterConfiguration + interface LocalStorageAdapterConfiguration extends Configuration.LocalDatabaseConfiguration { adapter: 'localstorage'; } diff --git a/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts b/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts index 06fe1f9a0b..8588420f78 100644 --- a/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts +++ b/pouchdb-adapter-localstorage/pouchdb-adapter-localstorage-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterLocalStorageyTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-adapter-localstorage/tsconfig.json b/pouchdb-adapter-localstorage/tsconfig.json new file mode 100644 index 0000000000..b252775f49 --- /dev/null +++ b/pouchdb-adapter-localstorage/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-localstorage-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-memory/pouchdb-adapter-memory.d.ts b/pouchdb-adapter-memory/index.d.ts similarity index 93% rename from pouchdb-adapter-memory/pouchdb-adapter-memory.d.ts rename to pouchdb-adapter-memory/index.d.ts index 75c89509ba..ae14dfdef8 100644 --- a/pouchdb-adapter-memory/pouchdb-adapter-memory.d.ts +++ b/pouchdb-adapter-memory/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace MemoryAdapter { diff --git a/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts b/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts index b234915648..9f59922fbc 100644 --- a/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts +++ b/pouchdb-adapter-memory/pouchdb-adapter-memory-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterMemoryTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-adapter-memory/tsconfig.json b/pouchdb-adapter-memory/tsconfig.json new file mode 100644 index 0000000000..4fddbceb6a --- /dev/null +++ b/pouchdb-adapter-memory/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-memory-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql.d.ts b/pouchdb-adapter-node-websql/index.d.ts similarity index 75% rename from pouchdb-adapter-node-websql/pouchdb-adapter-node-websql.d.ts rename to pouchdb-adapter-node-websql/index.d.ts index 57a0407a5e..f77a1ebd57 100644 --- a/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql.d.ts +++ b/pouchdb-adapter-node-websql/index.d.ts @@ -3,8 +3,8 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module 'pouchdb-adapter-node-websql' { const plugin: PouchDB.Plugin; diff --git a/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts b/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts index 4f751d3395..17ae2f4ec9 100644 --- a/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts +++ b/pouchdb-adapter-node-websql/pouchdb-adapter-node-websql-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterNodeWebSQLTests { function isBoolean(someBoolean: boolean) { } diff --git a/pouchdb-adapter-node-websql/tsconfig.json b/pouchdb-adapter-node-websql/tsconfig.json new file mode 100644 index 0000000000..83eeea81cb --- /dev/null +++ b/pouchdb-adapter-node-websql/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-node-websql-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-adapter-websql/pouchdb-adapter-websql.d.ts b/pouchdb-adapter-websql/index.d.ts similarity index 94% rename from pouchdb-adapter-websql/pouchdb-adapter-websql.d.ts rename to pouchdb-adapter-websql/index.d.ts index 64b732d482..4e0ee1cfe9 100644 --- a/pouchdb-adapter-websql/pouchdb-adapter-websql.d.ts +++ b/pouchdb-adapter-websql/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace Core { diff --git a/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts b/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts index 1c0242a17c..51916a3472 100644 --- a/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts +++ b/pouchdb-adapter-websql/pouchdb-adapter-websql-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBAdapterWebSQLTests { function isBoolean(someBoolean: boolean) { } diff --git a/pouchdb-adapter-websql/tsconfig.json b/pouchdb-adapter-websql/tsconfig.json new file mode 100644 index 0000000000..84a38d4f5c --- /dev/null +++ b/pouchdb-adapter-websql/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-adapter-websql-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-browser/pouchdb-browser.d.ts b/pouchdb-browser/index.d.ts similarity index 53% rename from pouchdb-browser/pouchdb-browser.d.ts rename to pouchdb-browser/index.d.ts index 3fb6dc9f2e..cab27f1e94 100644 --- a/pouchdb-browser/pouchdb-browser.d.ts +++ b/pouchdb-browser/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// declare module 'pouchdb-browser' { const PouchDb: PouchDB.Static; diff --git a/pouchdb-browser/pouchdb-browser-tests.ts b/pouchdb-browser/pouchdb-browser-tests.ts index 82575efada..8e5f1c913e 100644 --- a/pouchdb-browser/pouchdb-browser-tests.ts +++ b/pouchdb-browser/pouchdb-browser-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBBrowserTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-browser/tsconfig.json b/pouchdb-browser/tsconfig.json new file mode 100644 index 0000000000..d37324cfad --- /dev/null +++ b/pouchdb-browser/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-browser-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-core/pouchdb-core.d.ts b/pouchdb-core/index.d.ts similarity index 100% rename from pouchdb-core/pouchdb-core.d.ts rename to pouchdb-core/index.d.ts diff --git a/pouchdb-core/pouchdb-core-tests.ts b/pouchdb-core/pouchdb-core-tests.ts index b46bce834d..451c9837f8 100644 --- a/pouchdb-core/pouchdb-core-tests.ts +++ b/pouchdb-core/pouchdb-core-tests.ts @@ -1,5 +1,3 @@ -/// - namespace PouchDBCoreTests { function isString(someString: string) { } diff --git a/pouchdb-core/tsconfig.json b/pouchdb-core/tsconfig.json new file mode 100644 index 0000000000..f78c553ea9 --- /dev/null +++ b/pouchdb-core/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-core-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-http/pouchdb-http.d.ts b/pouchdb-http/index.d.ts similarity index 74% rename from pouchdb-http/pouchdb-http.d.ts rename to pouchdb-http/index.d.ts index 0fb6d2963c..e2e6043138 100644 --- a/pouchdb-http/pouchdb-http.d.ts +++ b/pouchdb-http/index.d.ts @@ -3,8 +3,8 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module 'pouchdb-http' { const PouchDb: PouchDB.Static; diff --git a/pouchdb-http/pouchdb-http-tests.ts b/pouchdb-http/pouchdb-http-tests.ts index b3378e68b1..17d28c81ea 100644 --- a/pouchdb-http/pouchdb-http-tests.ts +++ b/pouchdb-http/pouchdb-http-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBHttpTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-http/tsconfig.json b/pouchdb-http/tsconfig.json new file mode 100644 index 0000000000..dbd65e738b --- /dev/null +++ b/pouchdb-http/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-http-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-mapreduce/pouchdb-mapreduce.d.ts b/pouchdb-mapreduce/index.d.ts similarity index 94% rename from pouchdb-mapreduce/pouchdb-mapreduce.d.ts rename to pouchdb-mapreduce/index.d.ts index 1c04ddceaf..fdcd1fee74 100644 --- a/pouchdb-mapreduce/pouchdb-mapreduce.d.ts +++ b/pouchdb-mapreduce/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { export interface Database { diff --git a/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts b/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts index a42f8178ee..50d7979fd6 100644 --- a/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts +++ b/pouchdb-mapreduce/pouchdb-mapreduce-tests.ts @@ -1,5 +1,3 @@ -/// - namespace PouchDBBrowserTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-mapreduce/tsconfig.json b/pouchdb-mapreduce/tsconfig.json new file mode 100644 index 0000000000..1851efca0f --- /dev/null +++ b/pouchdb-mapreduce/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-mapreduce-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-node/pouchdb-node.d.ts b/pouchdb-node/index.d.ts similarity index 63% rename from pouchdb-node/pouchdb-node.d.ts rename to pouchdb-node/index.d.ts index deac5a0140..fe25d5d7b3 100644 --- a/pouchdb-node/pouchdb-node.d.ts +++ b/pouchdb-node/index.d.ts @@ -3,11 +3,11 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// declare namespace PouchDB { namespace Core { diff --git a/pouchdb-node/pouchdb-node-tests.ts b/pouchdb-node/pouchdb-node-tests.ts index ec9c338092..caa7f9d091 100644 --- a/pouchdb-node/pouchdb-node-tests.ts +++ b/pouchdb-node/pouchdb-node-tests.ts @@ -1,6 +1,3 @@ -/// -/// - namespace PouchDBBrowserTests { function testConstructor() { type MyModel = { numericProperty: number }; diff --git a/pouchdb-node/tsconfig.json b/pouchdb-node/tsconfig.json new file mode 100644 index 0000000000..1aeb6b5d46 --- /dev/null +++ b/pouchdb-node/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-node-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-replication/pouchdb-replication.d.ts b/pouchdb-replication/index.d.ts similarity index 92% rename from pouchdb-replication/pouchdb-replication.d.ts rename to pouchdb-replication/index.d.ts index 3dddb04f85..71b6ed3bf4 100644 --- a/pouchdb-replication/pouchdb-replication.d.ts +++ b/pouchdb-replication/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { namespace Replication { diff --git a/pouchdb-replication/pouchdb-replication-tests.ts b/pouchdb-replication/pouchdb-replication-tests.ts index 4e51bdea95..e69de29bb2 100644 --- a/pouchdb-replication/pouchdb-replication-tests.ts +++ b/pouchdb-replication/pouchdb-replication-tests.ts @@ -1 +0,0 @@ -/// diff --git a/pouchdb-replication/tsconfig.json b/pouchdb-replication/tsconfig.json new file mode 100644 index 0000000000..ef11e1f646 --- /dev/null +++ b/pouchdb-replication/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pouchdb-replication-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb-upsert/pouchdb-upsert.d.ts b/pouchdb-upsert/pouchdb-upsert.d.ts index b0a4e760a3..03f415ea90 100644 --- a/pouchdb-upsert/pouchdb-upsert.d.ts +++ b/pouchdb-upsert/pouchdb-upsert.d.ts @@ -3,7 +3,7 @@ // Definitions by: Keith D. Moore , Andrew Mitchell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace PouchDB { diff --git a/pouchdb-upsert/tsconfig.json b/pouchdb-upsert/tsconfig.json new file mode 100644 index 0000000000..a88f26d221 --- /dev/null +++ b/pouchdb-upsert/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "pouchdb-upsert.d.ts", + "pouchdb-upsert-tests.ts" + ] +} \ No newline at end of file diff --git a/pouchdb/index.d.ts b/pouchdb/index.d.ts index 2d40feb2ec..5822e631a8 100644 --- a/pouchdb/index.d.ts +++ b/pouchdb/index.d.ts @@ -3,20 +3,20 @@ // Definitions by: Andy Brown , Brian Geppert , Frederico Galvão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// +/// declare module 'pouchdb' { const plugin: PouchDB.Static; diff --git a/rc-tooltip/rc-tooltip-tests.tsx b/rc-tooltip/rc-tooltip-tests.tsx index d1f4db339a..751ffc43ec 100644 --- a/rc-tooltip/rc-tooltip-tests.tsx +++ b/rc-tooltip/rc-tooltip-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from 'react'; import * as ReactDOM from 'react-dom'; import * as Tooltip from 'rc-tooltip'; diff --git a/rc-tooltip/rc-tooltip.d.ts b/rc-tooltip/rc-tooltip.d.ts index a2a5c67314..91904c623a 100644 --- a/rc-tooltip/rc-tooltip.d.ts +++ b/rc-tooltip/rc-tooltip.d.ts @@ -3,11 +3,9 @@ // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Tooltip { - import React = __React; - export type Trigger = "hover" | "click" | "focus"; export type Placement = "left" | "right" | "top" | "bottom" | @@ -34,7 +32,7 @@ declare namespace Tooltip { } } -declare class Tooltip extends __React.Component {} +declare class Tooltip extends React.Component {} declare module "rc-tooltip" { export = Tooltip diff --git a/rc-tooltip/tsconfig.json b/rc-tooltip/tsconfig.json new file mode 100644 index 0000000000..3ad29fc103 --- /dev/null +++ b/rc-tooltip/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "rc-tooltip.d.ts", + "rc-tooltip-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-autosuggest/react-autosuggest-tests.tsx b/react-autosuggest/react-autosuggest-tests.tsx index 2190b9a443..5a107fe525 100644 --- a/react-autosuggest/react-autosuggest-tests.tsx +++ b/react-autosuggest/react-autosuggest-tests.tsx @@ -1,9 +1,3 @@ -// React-Autosuggest Test -// ================================================================================ -/// -/// -/// - //region Imports import React = require('react'); import ReactDOM = require('react-dom'); @@ -69,7 +63,7 @@ export class ReactAutosuggestBasicTest extends React.Component { inputProps={inputProps}/>; } - protected onSuggestionsSelected(event: React.FormEvent, data: ReactAutosuggest.ExplicitSuggestionSelectedEventData): void { + protected onSuggestionsSelected(event: React.FormEvent, data: ReactAutosuggest.ExplicitSuggestionSelectedEventData): void { alert(`Selected language is ${data.suggestion.name} (${data.suggestion.year}).`); } @@ -79,13 +73,13 @@ export class ReactAutosuggestBasicTest extends React.Component { //endregion //region Event handlers - protected onChange(event: React.FormEvent, {newValue, method}): void { + protected onChange(event: React.FormEvent, {newValue, method}: any): void { this.setState({ value: newValue }); } - protected onSuggestionsUpdateRequested({ value }): void { + protected onSuggestionsUpdateRequested({ value }: any): void { this.setState({ suggestions: this.getSuggestions(value) }); @@ -194,7 +188,7 @@ export class ReactAutosuggestMultipleTest extends React.Component { inputProps={inputProps} />; } - protected onSuggestionSelected(event: React.FormEvent, data: ReactAutosuggest.SuggestionSelectedEventData): void { + protected onSuggestionSelected(event: React.FormEvent, data: ReactAutosuggest.SuggestionSelectedEventData): void { const language = data.suggestion as Language; alert(`Selected language is ${language.name} (${language.year}).`); @@ -210,13 +204,13 @@ export class ReactAutosuggestMultipleTest extends React.Component { //endregion //region Event handlers - protected onChange(event: React.FormEvent, { newValue, method }): void { + protected onChange(event: React.FormEvent, { newValue, method }: any): void { this.setState({ value: newValue }); } - protected onSuggestionsUpdateRequested({ value }): void { + protected onSuggestionsUpdateRequested({ value }: any): void { this.setState({ suggestions: this.getSuggestions(value) }); @@ -298,7 +292,7 @@ export class ReactAutosuggestCustomTest extends React.Component { inputProps={inputProps} />; } - protected renderSuggestion(suggestion: IPerson, { value, valueBeforeUpDown }): JSX.Element { + protected renderSuggestion(suggestion: IPerson, { value, valueBeforeUpDown }: any): JSX.Element { const suggestionText = `${suggestion.first} ${suggestion.last}`; const query = (valueBeforeUpDown || value).trim(); const parts = suggestionText.split(' ').map((part: string) => { @@ -323,13 +317,13 @@ export class ReactAutosuggestCustomTest extends React.Component { //endregion //region Event handlers - protected onChange(event: React.FormEvent, {newValue, method}): void { + protected onChange(event: React.FormEvent, {newValue, method}: any): void { this.setState({ value: newValue }); } - protected onSuggestionsUpdateRequested({ value }): void { + protected onSuggestionsUpdateRequested({ value }: any): void { this.setState({ suggestions: this.getSuggestions(value) }); diff --git a/react-autosuggest/react-autosuggest.d.ts b/react-autosuggest/react-autosuggest.d.ts index eb6892adb2..cfec62d047 100644 --- a/react-autosuggest/react-autosuggest.d.ts +++ b/react-autosuggest/react-autosuggest.d.ts @@ -3,11 +3,9 @@ // Definitions by: Nicolas Schmitt // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace ReactAutosuggest { - import React = __React; - interface SuggestionUpdateRequest { value: string; reason: string; @@ -18,9 +16,9 @@ declare namespace ReactAutosuggest { valueBeforeUpDown?: string; } - interface InputProps extends React.HTMLAttributes { + interface InputProps extends React.HTMLAttributes { value: string; - onChange: (event: React.FormEvent, params?: {newValue: string, method: string}) => void; + onChange: (event: React.FormEvent, params?: {newValue: string, method: string}) => void; } interface ExplicitSuggestionSelectedEventData { @@ -55,7 +53,7 @@ declare namespace ReactAutosuggest { multiSection?: boolean; renderSectionTitle?: (section: any, inputValues: InputValues) => JSX.Element; getSectionSuggestions?: (section: any) => any[]; - onSuggestionSelected?: (event: React.FormEvent, data: SuggestionSelectedEventData | ExplicitSuggestionSelectedEventData) => void; + onSuggestionSelected?: (event: React.FormEvent, data: SuggestionSelectedEventData | ExplicitSuggestionSelectedEventData) => void; focusInputOnSuggestionClick?: boolean; theme?: Theme; id?: string; diff --git a/react-autosuggest/tsconfig.json b/react-autosuggest/tsconfig.json new file mode 100644 index 0000000000..3f2805e714 --- /dev/null +++ b/react-autosuggest/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-autosuggest.d.ts", + "react-autosuggest-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-big-calendar/react-big-calendar-tests.tsx b/react-big-calendar/react-big-calendar-tests.tsx index 8e7bca7a9d..38c6f9da0a 100644 --- a/react-big-calendar/react-big-calendar-tests.tsx +++ b/react-big-calendar/react-big-calendar-tests.tsx @@ -1,12 +1,9 @@ -/// -/// -/// -/// - import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactDOMServer from "react-dom/server"; import BigCalendar from 'react-big-calendar'; +// Don't want to add this as a dependency, because it is only used for tests. +declare const moment: any; // Init localizer BigCalendar.momentLocalizer(moment); diff --git a/react-big-calendar/react-big-calendar.d.ts b/react-big-calendar/react-big-calendar.d.ts index 3886a4ca59..26ca723cb4 100644 --- a/react-big-calendar/react-big-calendar.d.ts +++ b/react-big-calendar/react-big-calendar.d.ts @@ -3,8 +3,6 @@ // Definitions by: Piotr Witek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module 'react-big-calendar' { import * as React from 'react'; diff --git a/react-big-calendar/tsconfig.json b/react-big-calendar/tsconfig.json new file mode 100644 index 0000000000..ef22e3c080 --- /dev/null +++ b/react-big-calendar/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-big-calendar.d.ts", + "react-big-calendar-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-breadcrumbs/react-breadcrumbs-tests.tsx b/react-breadcrumbs/react-breadcrumbs-tests.tsx index b5e7621b35..d81877fccf 100644 --- a/react-breadcrumbs/react-breadcrumbs-tests.tsx +++ b/react-breadcrumbs/react-breadcrumbs-tests.tsx @@ -1,9 +1,5 @@ -/// -/// -/// - - import * as React from 'react'; +import * as ReactRouter from "react-router"; import * as Breadcrumbs from 'react-breadcrumbs'; diff --git a/react-breadcrumbs/react-breadcrumbs.d.ts b/react-breadcrumbs/react-breadcrumbs.d.ts index 885a883c6d..1d247f215d 100644 --- a/react-breadcrumbs/react-breadcrumbs.d.ts +++ b/react-breadcrumbs/react-breadcrumbs.d.ts @@ -3,13 +3,10 @@ // Definitions by: Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare namespace ReactBreadcrumbs { - import React = __React; - - interface BreadcrumbsProps extends React.Props { separator?: string | JSX.Element; displayMissing?: boolean; @@ -25,7 +22,7 @@ declare namespace ReactBreadcrumbs { activeItemClass?: string; excludes?: string[]; hideNoPath?: boolean; - routes: ReactRouter.RouteConfig; + routes: ReactRouter.Router.RouteConfig; setDocumentTitle?: boolean; params?: any; // todo make it compatible with params of the ReactRouter.RouteComponentProps } diff --git a/react-breadcrumbs/tsconfig.json b/react-breadcrumbs/tsconfig.json new file mode 100644 index 0000000000..5fc6650176 --- /dev/null +++ b/react-breadcrumbs/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-breadcrumbs.d.ts", + "react-breadcrumbs-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-calendar-timeline/react-calendar-timeline-tests.tsx b/react-calendar-timeline/react-calendar-timeline-tests.tsx index 7ce99f1ddf..f2bd8efab4 100644 --- a/react-calendar-timeline/react-calendar-timeline-tests.tsx +++ b/react-calendar-timeline/react-calendar-timeline-tests.tsx @@ -1,10 +1,7 @@ -/// -/// -/// - import * as React from "react"; -import * as moment from 'moment'; import ReactCalendarTimeline from 'react-calendar-timeline'; +// Don't want to add this as a dependency, because it is only used for tests. +declare const moment: any; const groups = [ {id: 1, title: 'group 1'}, @@ -29,5 +26,5 @@ class ExampleOfUsingReactCalendarTimeline extends React.Component<{}, {}> { /> ); - } + } }; \ No newline at end of file diff --git a/react-calendar-timeline/react-calendar-timeline.d.ts b/react-calendar-timeline/react-calendar-timeline.d.ts index f377d29610..029ea8b65b 100644 --- a/react-calendar-timeline/react-calendar-timeline.d.ts +++ b/react-calendar-timeline/react-calendar-timeline.d.ts @@ -3,18 +3,18 @@ // Definitions by: Rajab Shakirov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-calendar-timeline" { interface ReactCalendarTimeline { groups: { id: number; - title: any; // string | Element (__React.ClassicComponentClass); + title: any; // string | Element (React.ClassicComponentClass); }[]; items:{ id: number; group: number; - title?: any; // string | Element (__React.ClassicComponentClass); + title?: any; // string | Element (React.ClassicComponentClass); start_time: any; end_time: any; canMove?: boolean; @@ -65,6 +65,6 @@ declare module "react-calendar-timeline" { onBoundsChange?(canvasTimeStart:any, canvasTimeEnd:any): any; children?: any; } - let ReactCalendarTimeline : __React.ClassicComponentClass; + let ReactCalendarTimeline : React.ClassicComponentClass; export default ReactCalendarTimeline; } diff --git a/react-calendar-timeline/tsconfig.json b/react-calendar-timeline/tsconfig.json new file mode 100644 index 0000000000..4bd69bf193 --- /dev/null +++ b/react-calendar-timeline/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-calendar-timeline.d.ts", + "react-calendar-timeline-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-codemirror/react-codemirror-tests.tsx b/react-codemirror/react-codemirror-tests.tsx index 185f3b229d..2924ae4d5c 100644 --- a/react-codemirror/react-codemirror-tests.tsx +++ b/react-codemirror/react-codemirror-tests.tsx @@ -1,7 +1,4 @@ -/// -/// -/// - +import * as CodeMirror from "codemirror"; import * as React from "react"; import * as ReactDOM from "react-dom"; import * as Codemirror from "react-codemirror"; diff --git a/react-codemirror/react-codemirror.d.ts b/react-codemirror/react-codemirror.d.ts index 12311a2665..20176c2ae3 100644 --- a/react-codemirror/react-codemirror.d.ts +++ b/react-codemirror/react-codemirror.d.ts @@ -3,11 +3,11 @@ // Definitions by: Vicky Lai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare namespace ReactCodeMirror { - interface ReactCodeMirrorProps extends __React.Props { + interface ReactCodeMirrorProps extends React.Props { onChange?: (newValue: string) => any; // called when a change is made onFocusChange?: (focused: boolean) => any; // called when the editor is focused or loses focus onScroll?: (scrollInfo: CodeMirror.ScrollInfo) => any; // called when the editor is scrolled @@ -18,7 +18,7 @@ declare namespace ReactCodeMirror { codeMirrorInstance?: CodeMirror.Editor; // the CodeMirror instance } - interface ReactCodeMirror extends __React.Component { + interface ReactCodeMirror extends React.Component { /** Focuses the CodeMirror instance. */ focus(): void; @@ -26,7 +26,7 @@ declare namespace ReactCodeMirror { getCodeMirror(): CodeMirror.Editor; } - interface ReactCodeMirrorClass extends __React.ComponentClass { } + interface ReactCodeMirrorClass extends React.ComponentClass { } } declare module "react-codemirror" { diff --git a/react-codemirror/tsconfig.json b/react-codemirror/tsconfig.json new file mode 100644 index 0000000000..2c0e4d2ad5 --- /dev/null +++ b/react-codemirror/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-codemirror.d.ts", + "react-codemirror-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-data-grid/react-data-grid.d.ts b/react-data-grid/index.d.ts similarity index 98% rename from react-data-grid/react-data-grid.d.ts rename to react-data-grid/index.d.ts index 0748270a57..c76ab540b8 100644 --- a/react-data-grid/react-data-grid.d.ts +++ b/react-data-grid/index.d.ts @@ -3,12 +3,9 @@ // Definitions by: Simon Gellis // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - +/// declare namespace AdazzleReactDataGrid { - import React = __React; - interface GridProps { /** * Gets the data to render in each row. Required. @@ -248,7 +245,7 @@ declare namespace AdazzleReactDataGrid { * @param ev The react event * @param args The row and column coordinates of the cell, and the name of the event. */ - (ev: React.SyntheticEvent, args: {rowIdx: number, idx: number, name: string}): void + (ev: React.SyntheticEvent, args: {rowIdx: number, idx: number, name: string}): void } /** @@ -314,7 +311,7 @@ declare namespace AdazzleReactDataGrid { /** * The double click event. */ - e: React.SyntheticEvent + e: React.SyntheticEvent } /** @@ -414,8 +411,6 @@ declare namespace AdazzleReactDataGrid { } declare namespace AdazzleReactDataGridPlugins { - import React = __React; - // TODO: refine types for these addons export namespace Editors { export class AutoComplete extends React.Component { } diff --git a/react-data-grid/react-data-grid-tests.tsx b/react-data-grid/react-data-grid-tests.tsx index 1b95fa8cc7..4c2598c87c 100644 --- a/react-data-grid/react-data-grid-tests.tsx +++ b/react-data-grid/react-data-grid-tests.tsx @@ -1,11 +1,7 @@ -/// -/// -/// - import * as React from 'react'; import * as ReactDataGrid from 'react-data-grid'; import * as ReactDataGridPlugins from 'react-data-grid/addons'; -import * as faker from 'faker'; +import faker = require('faker'); var Editors = ReactDataGridPlugins.Editors; var Toolbar = ReactDataGridPlugins.Toolbar; @@ -202,7 +198,7 @@ class Example extends React.Component { getColumns() { var clonedColumns = columns.slice(); clonedColumns[2].events = { - onClick: function (ev:React.SyntheticEvent, args:{idx:number, rowIdx:number}) { + onClick: function (ev:React.SyntheticEvent, args:{idx:number, rowIdx:number}) { var idx = args.idx; var rowIdx = args.rowIdx; this.refs.grid.openCellEditor(rowIdx, idx); diff --git a/react-data-grid/tsconfig.json b/react-data-grid/tsconfig.json new file mode 100644 index 0000000000..0abfd403ad --- /dev/null +++ b/react-data-grid/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-data-grid-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-datepicker/package.json b/react-datepicker/package.json new file mode 100644 index 0000000000..992b24d513 --- /dev/null +++ b/react-datepicker/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "moment": "2.14.*" + } +} \ No newline at end of file diff --git a/react-datepicker/react-datepicker-tests.tsx b/react-datepicker/react-datepicker-tests.tsx index 6858e04335..53cd4723b5 100644 --- a/react-datepicker/react-datepicker-tests.tsx +++ b/react-datepicker/react-datepicker-tests.tsx @@ -1,34 +1,30 @@ -/// -/// -/// - import * as React from "react"; import * as moment from 'moment'; import * as DatePicker from 'react-datepicker'; -class ReactDatePicker extends React.Component<{}, {startDate:any,displayName:string}> { +class ReactDatePicker extends React.Component<{}, {startDate:any,displayName:string}> { constructor(props:any) { super(); - this.state = { + this.state = { startDate: moment(), - displayName: 'Example' + displayName: 'Example' } this.handleChange = this.handleChange.bind(this); } - + handleChange = function(date?:any) { this.setState({ startDate: date }); } - + render(){ return (
-
+ ); - } + } }; \ No newline at end of file diff --git a/react-datepicker/react-datepicker.d.ts b/react-datepicker/react-datepicker.d.ts index 733f783faa..1d8cdc89cc 100644 --- a/react-datepicker/react-datepicker.d.ts +++ b/react-datepicker/react-datepicker.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rajab Shakirov , Andrey Balokha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-datepicker" { interface ReactDatePicker { @@ -41,6 +41,6 @@ declare module "react-datepicker" { todayButton?: string; fixedHeight?: boolean; } - let ReactDatePicker: __React.ClassicComponentClass; + let ReactDatePicker: React.ClassicComponentClass; export = ReactDatePicker; } diff --git a/react-datepicker/tsconfig.json b/react-datepicker/tsconfig.json new file mode 100644 index 0000000000..60fcd89c5f --- /dev/null +++ b/react-datepicker/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-datepicker.d.ts", + "react-datepicker-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-daterange-picker/index.d.ts b/react-daterange-picker/index.d.ts new file mode 100644 index 0000000000..102b8bac16 --- /dev/null +++ b/react-daterange-picker/index.d.ts @@ -0,0 +1,65 @@ +// Type definitions for React Daterange Picker v1.1.0 +// Project: https://github.com/onefinestay/react-daterange-picker +// Definitions by: UNCOVER TRUTH Inc. +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +import * as React from "react"; +import * as moment from "moment-range"; + +export default class DateRangePicker extends React.Component {} +export as namespace ReactDateRangePicker; + +interface Props extends React.Props<{}> { + bemBlock?: string; + bemNamespace?: string; + dateStates?: DateState[]; + defaultState?: string; + disableNavigation?: boolean; + // Use Number Literal Types after TypeScript 2.0 GA released. + firstOfWeek?: number; // React.PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]) + helpMessage?: string; + initialFromValue?: boolean; + initialDate?: Date; + initialMonth?: number; + initialYear?: number; + initialRange?: {}; + maximumDate?: Date; + minimumDate?: Date; + numberOfCalendars?: number; + onHighlightDate?(date: Date): void; + onHighlightRange?(date: Date): void; + onSelect?(value: Props): void; + onSelectStart?(value: moment.Moment): void; + paginationArrowComponent?: PaginationArrow; + selectedLabel?: string; + selectionType?: 'single' |'range'; + singleDateRange?: boolean; + showLegend?: boolean; + stateDefinitions?: StateDefinitions; + value?: moment.Moment | moment.Range; +} + +interface DateState { + state: string; + range: moment.Range; +} + +interface StateDefinitions { + [key: string]: StateDefinition; +} + +interface StateDefinition { + color: string; + label: string; + selectable?: boolean; +} + +interface PaginationArrowProps extends React.Props<{}> { + disabled?: boolean; + onTrigger?(): void; + direction?: 'next' | 'previous'; +} + +declare class PaginationArrow extends React.Component { +} + diff --git a/react-daterange-picker/package.json b/react-daterange-picker/package.json new file mode 100644 index 0000000000..992b24d513 --- /dev/null +++ b/react-daterange-picker/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "moment": "2.14.*" + } +} \ No newline at end of file diff --git a/react-daterange-picker/react-daterange-picker-tests.tsx b/react-daterange-picker/react-daterange-picker-tests.tsx index 98665fddb6..1bb372d4db 100644 --- a/react-daterange-picker/react-daterange-picker-tests.tsx +++ b/react-daterange-picker/react-daterange-picker-tests.tsx @@ -1,12 +1,9 @@ -/// -/// - // Test app from https://github.com/onefinestay/react-daterange-picker/blob/master/example/index.jsx import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import * as moment from 'moment'; -import 'moment-range'; -import * as DateRangePicker from 'react-daterange-picker'; +import * as moment from 'moment-range'; +import DateRangePicker from "react-daterange-picker"; +import * as ReactDateRangePicker from "react-daterange-picker"; interface AppProps extends ReactDateRangePicker.Props { } diff --git a/react-daterange-picker/react-daterange-picker.d.ts b/react-daterange-picker/react-daterange-picker.d.ts deleted file mode 100644 index 4754e77140..0000000000 --- a/react-daterange-picker/react-daterange-picker.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// Type definitions for React Daterange Picker v1.1.0 -// Project: https://github.com/onefinestay/react-daterange-picker -// Definitions by: UNCOVER TRUTH Inc. -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -/// -/// -/// - -declare module 'react-daterange-picker' { - import DateRangePicker = ReactDateRangePicker.DateRangePicker; - export = DateRangePicker; -} - -declare namespace ReactDateRangePicker { - import React = __React; - - interface Props extends React.Props<{}> { - bemBlock?: string; - bemNamespace?: string; - dateStates?: DateState[]; - defaultState?: string; - disableNavigation?: boolean; - // Use Number Literal Types after TypeScript 2.0 GA released. - firstOfWeek?: number; // React.PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]) - helpMessage?: string; - initialFromValue?: boolean; - initialDate?: Date; - initialMonth?: number; - initialYear?: number; - initialRange?: {}; - maximumDate?: Date; - minimumDate?: Date; - numberOfCalendars?: number; - onHighlightDate?(date: Date): void; - onHighlightRange?(date: Date): void; - onSelect?(value: Props): void; - onSelectStart?(value: moment.Moment): void; - paginationArrowComponent?: PaginationArrow; - selectedLabel?: string; - selectionType?: 'single' |'range'; - singleDateRange?: boolean; - showLegend?: boolean; - stateDefinitions?: StateDefinitions; - value?: moment.Moment | moment.Range; - } - - interface DateState { - state: string; - range: moment.Range; - } - - interface StateDefinitions { - [key: string]: StateDefinition; - } - - interface StateDefinition { - color: string; - label: string; - selectable?: boolean; - } - - interface PaginationArrowProps extends React.Props<{}> { - disabled?: boolean; - onTrigger?(): void; - direction?: 'next' | 'previous'; - } - - class PaginationArrow extends React.Component { - } - - class DateRangePicker extends React.Component { - } - - namespace DateRangePicker { - } -} diff --git a/react-daterange-picker/tsconfig.json b/react-daterange-picker/tsconfig.json new file mode 100644 index 0000000000..a4828d6b09 --- /dev/null +++ b/react-daterange-picker/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-daterange-picker-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-dnd-html5-backend/react-dnd-html5-backend.d.ts b/react-dnd-html5-backend/react-dnd-html5-backend.d.ts index a635814842..5b9267b789 100644 --- a/react-dnd-html5-backend/react-dnd-html5-backend.d.ts +++ b/react-dnd-html5-backend/react-dnd-html5-backend.d.ts @@ -3,12 +3,10 @@ // Definitions by: Pedro Pereira // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "react-dnd-html5-backend" { - import ReactDnd = __ReactDnd; - export enum NativeTypes { FILE, URL, TEXT } export function getEmptyImage(): any; // Image export default class HTML5Backend implements __ReactDnd.Backend {} diff --git a/react-dnd-html5-backend/tsconfig.json b/react-dnd-html5-backend/tsconfig.json new file mode 100644 index 0000000000..b7ef8e9789 --- /dev/null +++ b/react-dnd-html5-backend/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-dnd-html5-backend.d.ts", + "react-dnd-html5-backend-tests.ts" + ] +} \ No newline at end of file diff --git a/react-file-input/react-file-input-tests.tsx b/react-file-input/react-file-input-tests.tsx index 208a8d29ed..857a86d4e2 100644 --- a/react-file-input/react-file-input-tests.tsx +++ b/react-file-input/react-file-input-tests.tsx @@ -1,11 +1,8 @@ -/// -/// - import * as React from "react"; import FileInput = require('react-file-input'); class Form extends React.Component<{}, {}> { - handleChange = (event: React.SyntheticEvent) => { + handleChange = (event: React.SyntheticEvent) => { const target: any = event.target; console.log('Selected file:', target.files[0]); } diff --git a/react-file-input/react-file-input.d.ts b/react-file-input/react-file-input.d.ts index ca0cac594b..9ec64fc1ec 100644 --- a/react-file-input/react-file-input.d.ts +++ b/react-file-input/react-file-input.d.ts @@ -3,18 +3,16 @@ // Definitions by: Dmitry Rogozhny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-file-input" { - import React = __React; - interface FileInputProps { name: string; className: string; accept: string; placeholder: string; disabled?: boolean; - onChange: (event: React.SyntheticEvent) => void; + onChange: (event: React.SyntheticEvent) => void; } class FileInput extends React.Component { diff --git a/react-file-input/tsconfig.json b/react-file-input/tsconfig.json new file mode 100644 index 0000000000..6e2b25f0d2 --- /dev/null +++ b/react-file-input/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-file-input.d.ts", + "react-file-input-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-file-reader-input/react-file-reader-input-tests.tsx b/react-file-reader-input/react-file-reader-input-tests.tsx index 0f8b70a35a..0b21edfd71 100644 --- a/react-file-reader-input/react-file-reader-input-tests.tsx +++ b/react-file-reader-input/react-file-reader-input-tests.tsx @@ -1,11 +1,8 @@ -/// -/// - import * as React from "react"; import FileReaderInput = require("react-file-reader-input"); class MyComponent extends React.Component<{}, {}> { - handleChange = (event: React.SyntheticEvent, results: any) => { + handleChange = (event: React.SyntheticEvent, results: any) => { results.forEach((result: any) => { const [event, file] = result; console.log(`Selected file ${file.name}!`); diff --git a/react-file-reader-input/react-file-reader-input.d.ts b/react-file-reader-input/react-file-reader-input.d.ts index 094e690aa1..649f0f688c 100644 --- a/react-file-reader-input/react-file-reader-input.d.ts +++ b/react-file-reader-input/react-file-reader-input.d.ts @@ -3,14 +3,12 @@ // Definitions by: Dmitry Rogozhny // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-file-reader-input" { - import React = __React; - interface FileInputProps { as?: string; - onChange?: (event: React.SyntheticEvent, results: any) => void; + onChange?: (event: React.SyntheticEvent, results: any) => void; } class FileInput extends React.Component { diff --git a/react-file-reader-input/tsconfig.json b/react-file-reader-input/tsconfig.json new file mode 100644 index 0000000000..ec09339b0e --- /dev/null +++ b/react-file-reader-input/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-file-reader-input.d.ts", + "react-file-reader-input-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-flexr/react-flexr-tests.tsx b/react-flexr/react-flexr-tests.tsx index 3d7c155386..224ceb686c 100644 --- a/react-flexr/react-flexr-tests.tsx +++ b/react-flexr/react-flexr-tests.tsx @@ -1,5 +1,4 @@ -/// -/// +/// import * as React from "react"; import * as ReactDOMServer from "react-dom/server"; diff --git a/react-flexr/react-flexr.d.ts b/react-flexr/react-flexr.d.ts index 3871abee74..6b24685087 100644 --- a/react-flexr/react-flexr.d.ts +++ b/react-flexr/react-flexr.d.ts @@ -3,11 +3,9 @@ // Definitions by: Jeffery Grajkowski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +// declare namespace __ReactFlexr { - export import React = __React; - interface GridProps extends React.Props { /** * Vertical Align Sub Cells: top, center, bottom diff --git a/react-flexr/tsconfig.json b/react-flexr/tsconfig.json new file mode 100644 index 0000000000..658fa94b63 --- /dev/null +++ b/react-flexr/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-flexr.d.ts", + "react-flexr-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-fontawesome/react-fontawesome-tests.tsx b/react-fontawesome/react-fontawesome-tests.tsx index d283e033fa..69bdeaf2c1 100644 --- a/react-fontawesome/react-fontawesome-tests.tsx +++ b/react-fontawesome/react-fontawesome-tests.tsx @@ -1,7 +1,3 @@ -/// -/// -/// - import * as React from "react"; import * as ReactDOM from "react-dom"; import FontAwesome = require('react-fontawesome'); diff --git a/react-fontawesome/react-fontawesome.d.ts b/react-fontawesome/react-fontawesome.d.ts index a790ad70ea..fc75fdfbd3 100644 --- a/react-fontawesome/react-fontawesome.d.ts +++ b/react-fontawesome/react-fontawesome.d.ts @@ -3,8 +3,6 @@ // Definitions by: Timur Rustamov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "react-fontawesome" { //Import react diff --git a/react-fontawesome/tsconfig.json b/react-fontawesome/tsconfig.json new file mode 100644 index 0000000000..9d1784f8a7 --- /dev/null +++ b/react-fontawesome/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-fontawesome.d.ts", + "react-fontawesome-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-i18next/index.d.ts b/react-i18next/index.d.ts new file mode 100644 index 0000000000..85c8e8851c --- /dev/null +++ b/react-i18next/index.d.ts @@ -0,0 +1,57 @@ +// Type definitions for react-i18next 1.7.0 +// Project: https://github.com/i18next/react-i18next +// Definitions by: Kostya Esmukov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as I18next from "i18next"; +import * as React from "react"; +import * as ReactRouter from "react-router"; + +export type TranslationFunction = I18next.TranslationFunction; + +// Extend your component's Prop interface with this one to get access to `this.props.t` +// +// Please note that if you use the `translateFuncName` option, you should create +// your own interface just like this one, but with your name of the translation function. +// +// interface MyComponentProps extends ReactI18next.InjectedTranslateProps {} +export interface InjectedTranslateProps { + t?: TranslationFunction; +} + +interface I18nextProviderProps { + i18n: I18next.I18n; + children?: React.ReactElement; +} + +export class I18nextProvider extends React.Component { } + + +type InterpolateValue = string | JSX.Element; + +interface InterpolateProps { + i18nKey: string; + + parent?: string; + regexp?: RegExp; + options?: I18next.TranslationOptions; + + useDangerouslySetInnerHTML?: boolean; + dangerouslySetInnerHTMLPartElement?: string; + + [regexKey: string]: InterpolateValue | RegExp | I18next.TranslationOptions | boolean; +} + +export class Interpolate extends React.Component { } + +interface TranslateOptions { + withRef?: boolean; + wait?: boolean; + translateFuncName?: string; +} + +export function translate(namespaces?: string[] | string, options?: TranslateOptions): (WrappedComponent: C) => C; + +export function loadNamespaces({ components, i18n }: { components: ReactRouter.RouteComponent[], i18n: I18next.I18n }): Promise; + +export as namespace ReactI18Next; diff --git a/react-i18next/react-i18next-tests.tsx b/react-i18next/react-i18next-tests.tsx index dd013002d4..012f920bc9 100644 --- a/react-i18next/react-i18next-tests.tsx +++ b/react-i18next/react-i18next-tests.tsx @@ -1,9 +1,3 @@ -/// -/// -/// -/// - - import * as ReactDOM from 'react-dom'; import * as React from 'react'; import * as i18n from 'i18next'; diff --git a/react-i18next/react-i18next.d.ts b/react-i18next/react-i18next.d.ts deleted file mode 100644 index 8993ab61cb..0000000000 --- a/react-i18next/react-i18next.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Type definitions for react-i18next 1.7.0 -// Project: https://github.com/i18next/react-i18next -// Definitions by: Kostya Esmukov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// -/// -/// - - -declare namespace ReactI18next { - import React = __React; - - export type TranslationFunction = I18next.TranslationFunction; - - // Extend your component's Prop interface with this one to get access to `this.props.t` - // - // Please note that if you use the `translateFuncName` option, you should create - // your own interface just like this one, but with your name of the translation function. - // - // interface MyComponentProps extends ReactI18next.InjectedTranslateProps {} - export interface InjectedTranslateProps { - t?: TranslationFunction; - } - - interface I18nextProviderProps { - i18n: I18next.I18n; - children?: React.ReactElement; - } - - export class I18nextProvider extends React.Component { } - - - type InterpolateValue = string | JSX.Element; - - interface InterpolateProps { - i18nKey: string; - - parent?: string; - regexp?: RegExp; - options?: I18next.TranslationOptions; - - useDangerouslySetInnerHTML?: boolean; - dangerouslySetInnerHTMLPartElement?: string; - - [regexKey: string]: InterpolateValue | RegExp | I18next.TranslationOptions | boolean; - } - - export class Interpolate extends React.Component { } - - interface TranslateOptions { - withRef?: boolean; - wait?: boolean; - translateFuncName?: string; - } - - export function translate(namespaces?: string[] | string, options?: TranslateOptions): (WrappedComponent: C) => C; - - export function loadNamespaces({ components, i18n }: { components: ReactRouter.RouteComponent[], i18n: I18next.I18n }): Promise; - -} - -declare module 'react-i18next' { - export = ReactI18next; -} diff --git a/react-i18next/tsconfig.json b/react-i18next/tsconfig.json new file mode 100644 index 0000000000..ba4f230166 --- /dev/null +++ b/react-i18next/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react", + "experimentalDecorators": true + }, + "files": [ + "index.d.ts", + "react-i18next-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-imageloader/react-imageloader-tests.tsx b/react-imageloader/react-imageloader-tests.tsx index 9a1ddf0204..a6d845825f 100644 --- a/react-imageloader/react-imageloader-tests.tsx +++ b/react-imageloader/react-imageloader-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import ImageLoader = require('react-imageloader'); import * as React from 'react'; diff --git a/react-imageloader/react-imageloader.d.ts b/react-imageloader/react-imageloader.d.ts index 1ba1ba38d0..8132058aa0 100644 --- a/react-imageloader/react-imageloader.d.ts +++ b/react-imageloader/react-imageloader.d.ts @@ -3,10 +3,10 @@ // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-imageloader" { - interface ImageLoaderProps extends __React.Props { + interface ImageLoaderProps extends React.Props { /** An optional class name for the wrapper component. */ className?: string; @@ -20,19 +20,19 @@ declare module "react-imageloader" { onLoad?: (event: any) => void; /** An optional function that returns a React element to be shown while the image loads. */ - preloader?: (params: any) => __React.ReactElement; + preloader?: (params: any) => React.ReactElement; /** The URL of the image to be loaded. */ src: string; /** An optional object containing styles for the wrapper component. */ - style?: __React.CSSProperties; + style?: React.CSSProperties; /** A function that takes a props argument and returns a React element to be used as the wrapper component. Defaults to React.DOM.span. */ - wrapper?: (props: any) => __React.ReactElement; + wrapper?: (props: any) => React.ReactElement; } - class ImageLoader extends __React.Component {} + class ImageLoader extends React.Component {} export = ImageLoader; } diff --git a/react-imageloader/tsconfig.json b/react-imageloader/tsconfig.json new file mode 100644 index 0000000000..ce35e9adb2 --- /dev/null +++ b/react-imageloader/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-imageloader.d.ts", + "react-imageloader-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-is-deprecated/react-is-deprecated-tests.ts b/react-is-deprecated/react-is-deprecated-tests.ts index f5574e44cf..2f01286189 100644 --- a/react-is-deprecated/react-is-deprecated-tests.ts +++ b/react-is-deprecated/react-is-deprecated-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import { PropTypes } from 'react'; import { deprecate, addIsDeprecated } from 'react-is-deprecated'; diff --git a/react-is-deprecated/react-is-deprecated.d.ts b/react-is-deprecated/react-is-deprecated.d.ts index 88a34306a5..a896b68619 100644 --- a/react-is-deprecated/react-is-deprecated.d.ts +++ b/react-is-deprecated/react-is-deprecated.d.ts @@ -3,8 +3,6 @@ // Definitions by: Sean Kelley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module 'react-is-deprecated' { import { Validator, Requireable, ValidationMap, ReactPropTypes } from 'react'; diff --git a/react-is-deprecated/tsconfig.json b/react-is-deprecated/tsconfig.json new file mode 100644 index 0000000000..08b45699ce --- /dev/null +++ b/react-is-deprecated/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-is-deprecated.d.ts", + "react-is-deprecated-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-jsonschema-form/react-jsonschema-form-tests.tsx b/react-jsonschema-form/react-jsonschema-form-tests.tsx index 5fa0fd914a..0e4e8eeef9 100644 --- a/react-jsonschema-form/react-jsonschema-form-tests.tsx +++ b/react-jsonschema-form/react-jsonschema-form-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import Form from "react-jsonschema-form"; diff --git a/react-jsonschema-form/react-jsonschema-form.d.ts b/react-jsonschema-form/react-jsonschema-form.d.ts index 5004bb132d..a12c95b26d 100644 --- a/react-jsonschema-form/react-jsonschema-form.d.ts +++ b/react-jsonschema-form/react-jsonschema-form.d.ts @@ -3,8 +3,6 @@ // Definitions by: Dan Fox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "react-jsonschema-form" { import * as React from "react"; diff --git a/react-jsonschema-form/tsconfig.json b/react-jsonschema-form/tsconfig.json new file mode 100644 index 0000000000..b70a03d4ba --- /dev/null +++ b/react-jsonschema-form/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-jsonschema-form.d.ts", + "react-jsonschema-form-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-measure/react-measure-tests.tsx b/react-measure/react-measure-tests.tsx index 9b1a8e2f91..da2a551a04 100644 --- a/react-measure/react-measure-tests.tsx +++ b/react-measure/react-measure-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import * as Measure from "react-measure"; diff --git a/react-measure/react-measure.d.ts b/react-measure/react-measure.d.ts index 7e4a30c39b..8735747bac 100644 --- a/react-measure/react-measure.d.ts +++ b/react-measure/react-measure.d.ts @@ -3,8 +3,6 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "react-measure" { import * as React from "react"; diff --git a/react-measure/tsconfig.json b/react-measure/tsconfig.json new file mode 100644 index 0000000000..0a0e3ad58e --- /dev/null +++ b/react-measure/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "experimentalDecorators": true, + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-measure.d.ts", + "react-measure-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-modal/react-modal-tests.tsx b/react-modal/react-modal-tests.tsx index 40fc2a637e..b153fa0573 100644 --- a/react-modal/react-modal-tests.tsx +++ b/react-modal/react-modal-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import * as ReactModal from 'react-modal'; diff --git a/react-modal/react-modal.d.ts b/react-modal/react-modal.d.ts index 2aac95eacb..4950870b7c 100644 --- a/react-modal/react-modal.d.ts +++ b/react-modal/react-modal.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rajab Shakirov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-modal" { interface ReactModal { @@ -23,6 +23,6 @@ declare module "react-modal" { ariaHideApp?: boolean, shouldCloseOnOverlayClick?: boolean } - let ReactModal: __React.ClassicComponentClass; + let ReactModal: React.ClassicComponentClass; export = ReactModal; } diff --git a/react-modal/tsconfig.json b/react-modal/tsconfig.json new file mode 100644 index 0000000000..87f956ff88 --- /dev/null +++ b/react-modal/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-modal.d.ts", + "react-modal-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-motion-slider/react-motion-slider-tests.tsx b/react-motion-slider/react-motion-slider-tests.tsx index b51f57fc3b..783f2356a3 100644 --- a/react-motion-slider/react-motion-slider-tests.tsx +++ b/react-motion-slider/react-motion-slider-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import Slider from "react-motion-slider"; diff --git a/react-motion-slider/react-motion-slider.d.ts b/react-motion-slider/react-motion-slider.d.ts index 939500150d..e6046079b7 100644 --- a/react-motion-slider/react-motion-slider.d.ts +++ b/react-motion-slider/react-motion-slider.d.ts @@ -3,10 +3,6 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - - declare module "react-motion-slider" { import * as React from "react"; import { OpaqueConfig } from "react-motion"; diff --git a/react-motion-slider/tsconfig.json b/react-motion-slider/tsconfig.json new file mode 100644 index 0000000000..09a7065508 --- /dev/null +++ b/react-motion-slider/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-motion-slider.d.ts", + "react-motion-slider-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-relay/react-relay-test.tsx b/react-relay/react-relay-test.tsx index e6632e76f9..dce5435105 100644 --- a/react-relay/react-relay-test.tsx +++ b/react-relay/react-relay-test.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react" import * as Relay from "react-relay" diff --git a/react-relay/react-relay.d.ts b/react-relay/react-relay.d.ts index 1a0ae89069..08833c8bc5 100644 --- a/react-relay/react-relay.d.ts +++ b/react-relay/react-relay.d.ts @@ -3,8 +3,6 @@ // Definitions by: Johannes Schickling // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "react-relay" { import * as React from "react"; diff --git a/react-relay/tsconfig.json b/react-relay/tsconfig.json new file mode 100644 index 0000000000..c3b3c4e209 --- /dev/null +++ b/react-relay/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-relay.d.ts", + "react-relay-test.tsx" + ] +} \ No newline at end of file diff --git a/react-responsive/react-responsive-tests.tsx b/react-responsive/react-responsive-tests.tsx index 3c1d25c62c..02b948c8a4 100644 --- a/react-responsive/react-responsive-tests.tsx +++ b/react-responsive/react-responsive-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import * as MediaQuery from "react-responsive"; diff --git a/react-responsive/react-responsive.d.ts b/react-responsive/react-responsive.d.ts index 2c92b38413..126a27f5b7 100644 --- a/react-responsive/react-responsive.d.ts +++ b/react-responsive/react-responsive.d.ts @@ -3,8 +3,6 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "react-responsive" { import * as React from "react"; diff --git a/react-responsive/tsconfig.json b/react-responsive/tsconfig.json new file mode 100644 index 0000000000..a15be69b1e --- /dev/null +++ b/react-responsive/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-responsive.d.ts", + "react-responsive-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-router-redux/index.d.ts b/react-router-redux/index.d.ts index c21622386e..7e8ef4c069 100644 --- a/react-router-redux/index.d.ts +++ b/react-router-redux/index.d.ts @@ -34,7 +34,7 @@ declare namespace ReactRouterRedux { type: string payload?: any } - + interface RouteActions { push: PushAction; replace: ReplaceAction; @@ -45,7 +45,7 @@ declare namespace ReactRouterRedux { interface ReactRouterReduxHistory extends History.History { unsubscribe(): void; } - + interface DefaultSelectLocationState extends Function { (state: any): any; } diff --git a/react-router/index.d.ts b/react-router/index.d.ts index 88edfc846f..7435e492ef 100644 --- a/react-router/index.d.ts +++ b/react-router/index.d.ts @@ -6,7 +6,7 @@ export as namespace ReactRouter; import * as React from 'react'; - + export const routerShape: React.Requireable export const locationShape: React.Requireable @@ -45,6 +45,7 @@ export type EnterHook = Router.EnterHook; export type LeaveHook = Router.LeaveHook; export type ParseQueryString = Router.ParseQueryString; export type RedirectFunction = Router.RedirectFunction; +export type RouteComponent = Router.RouteComponent; export type RouteComponentProps = Router.RouteComponentProps; export type RouteHook = Router.RouteHook; export type StringifyQuery = Router.StringifyQuery; diff --git a/react-router/lib/Router.d.ts b/react-router/lib/Router.d.ts index c885954425..790ec18486 100644 --- a/react-router/lib/Router.d.ts +++ b/react-router/lib/Router.d.ts @@ -93,7 +93,7 @@ declare namespace Router { // push and other functions. // // https://github.com/reactjs/react-router/blob/v2.4.0/upgrade-guides/v2.4.0.md - + interface InjectedRouter { push: (pathOrLoc: History.LocationDescriptor) => void replace: (pathOrLoc: History.LocationDescriptor) => void diff --git a/react-scrollbar/react-scrollbar-tests.tsx b/react-scrollbar/react-scrollbar-tests.tsx index 784a44d899..a782d7b83c 100644 --- a/react-scrollbar/react-scrollbar-tests.tsx +++ b/react-scrollbar/react-scrollbar-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import ScrollArea = require('react-scrollbar'); import * as React from 'react'; diff --git a/react-scrollbar/react-scrollbar.d.ts b/react-scrollbar/react-scrollbar.d.ts index 8df2435678..1abc23921b 100644 --- a/react-scrollbar/react-scrollbar.d.ts +++ b/react-scrollbar/react-scrollbar.d.ts @@ -3,10 +3,10 @@ // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "react-scrollbar" { - interface ScrollAreaProps extends __React.Props { + interface ScrollAreaProps extends React.Props { className?: string, style?: __React.CSSProperties, speed?: number, @@ -26,7 +26,7 @@ declare module "react-scrollbar" { swapWheelAxes?: boolean } - class ScrollArea extends __React.Component {} + class ScrollArea extends React.Component {} export = ScrollArea; } diff --git a/react-scrollbar/tsconfig.json b/react-scrollbar/tsconfig.json new file mode 100644 index 0000000000..1f4f102561 --- /dev/null +++ b/react-scrollbar/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-scrollbar.d.ts", + "react-scrollbar-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-slick/react-slick-test.tsx b/react-slick/react-slick-test.tsx index c351419401..7b51dbdf3a 100644 --- a/react-slick/react-slick-test.tsx +++ b/react-slick/react-slick-test.tsx @@ -1,7 +1,3 @@ -/// -/// -/// - import * as React from "react" import * as ReactDOM from "react-dom" import * as Slider from "react-slick" diff --git a/react-slick/react-slick.d.ts b/react-slick/react-slick.d.ts index 43c9cdcf69..9bd267cad1 100644 --- a/react-slick/react-slick.d.ts +++ b/react-slick/react-slick.d.ts @@ -3,7 +3,7 @@ // Definitions by: Andrey Balokha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// interface __config { className?: string @@ -45,6 +45,6 @@ interface Slider extends __config { } declare module "react-slick" { - var Slider: __React.ClassicComponentClass; + var Slider: React.ClassicComponentClass; export = Slider; } diff --git a/react-slick/tsconfig.json b/react-slick/tsconfig.json new file mode 100644 index 0000000000..f29388a78f --- /dev/null +++ b/react-slick/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-slick.d.ts", + "react-slick-test.tsx" + ] +} \ No newline at end of file diff --git a/react-sortable-hoc/react-sortable-hoc-tests.tsx b/react-sortable-hoc/react-sortable-hoc-tests.tsx index 9c382c4855..0e90f9aa0a 100644 --- a/react-sortable-hoc/react-sortable-hoc-tests.tsx +++ b/react-sortable-hoc/react-sortable-hoc-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import React = require('react'); import ReactDOM = require('react-dom'); import ReactSortableHOC = require('react-sortable-hoc'); diff --git a/react-sortable-hoc/react-sortable-hoc.d.ts b/react-sortable-hoc/react-sortable-hoc.d.ts index a229eb6f43..b65bae7641 100644 --- a/react-sortable-hoc/react-sortable-hoc.d.ts +++ b/react-sortable-hoc/react-sortable-hoc.d.ts @@ -3,8 +3,6 @@ // Definitions by: Ivo Stratev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module 'react-sortable-hoc' { import React = require('react'); @@ -18,7 +16,7 @@ declare module 'react-sortable-hoc' { collection: Offset; } - export type SortEvent = React.MouseEvent | React.TouchEvent; + export type SortEvent = React.MouseEvent | React.TouchEvent; export type SortStartHandler = (sort: SortStart, event: SortEvent) => void; diff --git a/react-sortable-hoc/tsconfig.json b/react-sortable-hoc/tsconfig.json new file mode 100644 index 0000000000..595b57b362 --- /dev/null +++ b/react-sortable-hoc/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-sortable-hoc.d.ts", + "react-sortable-hoc-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-split-pane/react-split-pane-tests.tsx b/react-split-pane/react-split-pane-tests.tsx index 7aa6c006e6..46a13653fd 100644 --- a/react-split-pane/react-split-pane-tests.tsx +++ b/react-split-pane/react-split-pane-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import * as SplitPane from "react-split-pane"; diff --git a/react-split-pane/react-split-pane.d.ts b/react-split-pane/react-split-pane.d.ts index e3d7f959de..3a6bc7bc6e 100644 --- a/react-split-pane/react-split-pane.d.ts +++ b/react-split-pane/react-split-pane.d.ts @@ -3,7 +3,7 @@ // Definitions by: Roger Chen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace ReactSplitPane { interface ReactSplitPaneProps { @@ -32,7 +32,7 @@ declare namespace ReactSplitPane { split?: string; } - interface ReactSplitPaneClass extends __React.ComponentClass { } + interface ReactSplitPaneClass extends React.ComponentClass { } } declare module "react-split-pane" { diff --git a/react-split-pane/tsconfig.json b/react-split-pane/tsconfig.json new file mode 100644 index 0000000000..e6db5fa417 --- /dev/null +++ b/react-split-pane/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "react-split-pane.d.ts", + "react-split-pane-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-swipeable/react-swipeable-tests.tsx b/react-swipeable/react-swipeable-tests.tsx index d28d6d348b..7e8682ade7 100644 --- a/react-swipeable/react-swipeable-tests.tsx +++ b/react-swipeable/react-swipeable-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import Swipeable = require('react-swipeable'); import React = require('react'); diff --git a/react-swipeable/react-swipeable.d.ts b/react-swipeable/react-swipeable.d.ts index db0d7b5e4f..97d2842d47 100644 --- a/react-swipeable/react-swipeable.d.ts +++ b/react-swipeable/react-swipeable.d.ts @@ -3,26 +3,23 @@ // Definitions by: Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace ReactSwipeableModule { - - import React = __React; - interface onSwipingCallback { - (event: React.TouchEvent, deltaX: number, deltaY: number, absX: number, absY: number, velocity: number): void; + (event: React.TouchEvent, deltaX: number, deltaY: number, absX: number, absY: number, velocity: number): void; } interface OnSwipedCallback { - (event: React.TouchEvent, deltaX: number, deltaY: number, isFlick: boolean): void; + (event: React.TouchEvent, deltaX: number, deltaY: number, isFlick: boolean): void; } interface OnSwipedDirectionCallback { - (event: React.TouchEvent, delta: number, isFlick: boolean): void; + (event: React.TouchEvent, delta: number, isFlick: boolean): void; } interface OnSwipingDirectionCallback { - (event: React.TouchEvent, delta: number): void; + (event: React.TouchEvent, delta: number): void; } interface Props { diff --git a/react-swipeable/tsconfig.json b/react-swipeable/tsconfig.json new file mode 100644 index 0000000000..02fd1d28d5 --- /dev/null +++ b/react-swipeable/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-swipeable.d.ts", + "react-swipeable-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-textarea-autosize/react-textarea-autosize-tests.tsx b/react-textarea-autosize/react-textarea-autosize-tests.tsx index d87117fa44..b10f92bc6f 100644 --- a/react-textarea-autosize/react-textarea-autosize-tests.tsx +++ b/react-textarea-autosize/react-textarea-autosize-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import Textarea from "react-textarea-autosize"; diff --git a/react-textarea-autosize/react-textarea-autosize.d.ts b/react-textarea-autosize/react-textarea-autosize.d.ts index 6a4d290937..ebf589f873 100644 --- a/react-textarea-autosize/react-textarea-autosize.d.ts +++ b/react-textarea-autosize/react-textarea-autosize.d.ts @@ -3,9 +3,6 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - - declare module "react-textarea-autosize" { import * as React from "react"; @@ -21,7 +18,7 @@ declare module "react-textarea-autosize" { * Callback on value change * @param event */ - onChange?: (event: React.FormEvent) => void; + onChange?: (event: React.FormEvent) => void; /** * Callback on height change * @param height diff --git a/react-textarea-autosize/tsconfig.json b/react-textarea-autosize/tsconfig.json new file mode 100644 index 0000000000..5f7456c652 --- /dev/null +++ b/react-textarea-autosize/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-textarea-autosize.d.ts", + "react-textarea-autosize-tests.tsx" + ] +} \ No newline at end of file diff --git a/react-user-tour/react-user-tour-tests.tsx b/react-user-tour/react-user-tour-tests.tsx index 5cfe3f3dab..35b8067f55 100644 --- a/react-user-tour/react-user-tour-tests.tsx +++ b/react-user-tour/react-user-tour-tests.tsx @@ -3,9 +3,7 @@ // Definitions by: Carlo Cancellieri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +/// import React = require('react'); import ReactDOM = require('react-dom'); @@ -46,7 +44,7 @@ class TestApp extends React.Component<{}, State> { ]} />; - return
+ return
{Tour}
; } diff --git a/react-user-tour/react-user-tour-tests.tsx.tscparams b/react-user-tour/react-user-tour-tests.tsx.tscparams deleted file mode 100644 index b238f4f2a8..0000000000 --- a/react-user-tour/react-user-tour-tests.tsx.tscparams +++ /dev/null @@ -1 +0,0 @@ ---noImplicitAny --jsx react diff --git a/react-user-tour/react-user-tour.d.ts b/react-user-tour/react-user-tour.d.ts index 1237977dd1..f1a0de4d46 100644 --- a/react-user-tour/react-user-tour.d.ts +++ b/react-user-tour/react-user-tour.d.ts @@ -3,7 +3,7 @@ // Definitions by: Carlo Cancellieri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'react-user-tour' { @@ -22,11 +22,11 @@ declare module 'react-user-tour' { /** a react element representing the header of the current step */ - title: string; + title: string | JSX.Element; /** a react element representing the main body message of the tour step */ - body: string; + body: string | JSX.Element; /** Optional properties horizontalOffset and verticalOffset values allow to move tooltip around pointed element. */ @@ -41,7 +41,7 @@ declare module 'react-user-tour' { position?: 'left' | 'right' | 'top' | 'topLeft' | 'bottom' | 'bottomLeft'; } - interface TourProps extends HTMLAttributes { + interface TourProps extends HTMLAttributes { /** A boolean value representing whether or not the tour should currently be displayed */ diff --git a/react-user-tour/tsconfig.json b/react-user-tour/tsconfig.json new file mode 100644 index 0000000000..6ba3336beb --- /dev/null +++ b/react-user-tour/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "react-user-tour.d.ts", + "react-user-tour-tests.tsx" + ] +} \ No newline at end of file diff --git a/redux-bootstrap/redux-bootstrap-tests.tsx b/redux-bootstrap/redux-bootstrap-tests.tsx index b769063e3e..1630e759a5 100644 --- a/redux-bootstrap/redux-bootstrap-tests.tsx +++ b/redux-bootstrap/redux-bootstrap-tests.tsx @@ -1,5 +1,3 @@ -/// - import bootstrap from "redux-bootstrap"; let routes: JSX.Element = null; diff --git a/redux-bootstrap/redux-bootstrap.d.ts b/redux-bootstrap/redux-bootstrap.d.ts index 2bfdc53f31..b01baa72cd 100644 --- a/redux-bootstrap/redux-bootstrap.d.ts +++ b/redux-bootstrap/redux-bootstrap.d.ts @@ -3,11 +3,11 @@ // Definitions by: Remo H. Jansen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +/// +/// declare module "redux-bootstrap" { + import ReactRouterRedux = require("react-router-redux"); interface BootstrapOptions { routes: JSX.Element; diff --git a/redux-bootstrap/tsconfig.json b/redux-bootstrap/tsconfig.json new file mode 100644 index 0000000000..e5e83c285f --- /dev/null +++ b/redux-bootstrap/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "redux-bootstrap.d.ts", + "redux-bootstrap-tests.tsx" + ] +} \ No newline at end of file diff --git a/redux-mock-store/redux-mock-store-tests.ts b/redux-mock-store/redux-mock-store-tests.ts index 960591f8fb..373a3f8fd1 100644 --- a/redux-mock-store/redux-mock-store-tests.ts +++ b/redux-mock-store/redux-mock-store-tests.ts @@ -1,5 +1,4 @@ -/// - +import * as Redux from 'redux'; import configureStore, {IStore} from 'redux-mock-store'; // Redux store API tests diff --git a/redux-mock-store/redux-mock-store.d.ts b/redux-mock-store/redux-mock-store.d.ts index 6cc463e2d1..ad37ad4e06 100644 --- a/redux-mock-store/redux-mock-store.d.ts +++ b/redux-mock-store/redux-mock-store.d.ts @@ -3,7 +3,7 @@ // Definitions by: Marian Palkus , Cap3 // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module 'redux-mock-store' { import * as Redux from 'redux' diff --git a/redux-mock-store/tsconfig.json b/redux-mock-store/tsconfig.json new file mode 100644 index 0000000000..9e015629bd --- /dev/null +++ b/redux-mock-store/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "redux-mock-store.d.ts", + "redux-mock-store-tests.ts" + ] +} \ No newline at end of file diff --git a/redux-optimistic-ui/redux-optimistic-ui-tests.ts b/redux-optimistic-ui/redux-optimistic-ui-tests.ts index a2e67fa4b6..77c3a72d0e 100644 --- a/redux-optimistic-ui/redux-optimistic-ui-tests.ts +++ b/redux-optimistic-ui/redux-optimistic-ui-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import { Action } from "redux"; import { OptimisticState, OptimisticAction, BEGIN, optimistic, ensureState } from "redux-optimistic-ui"; diff --git a/redux-optimistic-ui/redux-optimistic-ui.d.ts b/redux-optimistic-ui/redux-optimistic-ui.d.ts index f487a64ffd..0471712c6a 100644 --- a/redux-optimistic-ui/redux-optimistic-ui.d.ts +++ b/redux-optimistic-ui/redux-optimistic-ui.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "redux-optimistic-ui" { import { Reducer } from "redux"; diff --git a/redux-optimistic-ui/tsconfig.json b/redux-optimistic-ui/tsconfig.json new file mode 100644 index 0000000000..8de339b93a --- /dev/null +++ b/redux-optimistic-ui/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "redux-optimistic-ui.d.ts", + "redux-optimistic-ui-tests.ts" + ] +} \ No newline at end of file diff --git a/redux-promise-middleware/redux-promise-middleware-tests.ts b/redux-promise-middleware/redux-promise-middleware-tests.ts index 64fde63170..788a3faee3 100644 --- a/redux-promise-middleware/redux-promise-middleware-tests.ts +++ b/redux-promise-middleware/redux-promise-middleware-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import { createStore, applyMiddleware, Store, Dispatch } from "redux"; import promiseMiddleware from "redux-promise-middleware"; @@ -38,7 +35,7 @@ const actionCreator1 = () => ({ const actionCreator2 = () => ({ type: "FIRST_ACTION_TYPE", payload: { - promise: Promise.resolve((action: string, dispatch: Redux.Dispatch, getState: Function) => { + promise: Promise.resolve((action: string, dispatch: Dispatch, getState: Function) => { dispatch({ type: "SECEOND_ACTION_TYPE", payload: "..." }); dispatch(someActionCreator()); }) diff --git a/redux-promise-middleware/redux-promise-middleware.d.ts b/redux-promise-middleware/redux-promise-middleware.d.ts index e1350cde0e..832d1d9725 100644 --- a/redux-promise-middleware/redux-promise-middleware.d.ts +++ b/redux-promise-middleware/redux-promise-middleware.d.ts @@ -3,7 +3,7 @@ // Definitions by: ianks // Definitions: https://github.com/borisyankov/DefinitelyTyped -/// +/// declare module "redux-promise-middleware" { function promiseMiddleware(config?: { promiseTypeSuffixes: string[] }): Redux.Middleware; diff --git a/redux-promise-middleware/tsconfig.json b/redux-promise-middleware/tsconfig.json new file mode 100644 index 0000000000..380792b821 --- /dev/null +++ b/redux-promise-middleware/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "redux-promise-middleware.d.ts", + "redux-promise-middleware-tests.ts" + ] +} \ No newline at end of file diff --git a/redux-storage/redux-storage-tests.ts b/redux-storage/redux-storage-tests.ts index 484366c925..2be0d91db2 100644 --- a/redux-storage/redux-storage-tests.ts +++ b/redux-storage/redux-storage-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import { Action, createStore, applyMiddleware } from "redux"; import { reducer, createMiddleware, createLoader } from "redux-storage"; import reduxStorageImmutableMerger from "redux-storage-merger-immutablejs"; diff --git a/redux-storage/redux-storage.d.ts b/redux-storage/redux-storage.d.ts index e9583d157b..dac23aeebc 100644 --- a/redux-storage/redux-storage.d.ts +++ b/redux-storage/redux-storage.d.ts @@ -3,7 +3,7 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "redux-storage" { import { Reducer, Store, Middleware } from "redux"; diff --git a/redux-storage/tsconfig.json b/redux-storage/tsconfig.json new file mode 100644 index 0000000000..2559181263 --- /dev/null +++ b/redux-storage/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "redux-storage.d.ts", + "redux-storage-tests.ts" + ] +} \ No newline at end of file diff --git a/redux-ui/redux-ui-tests.ts b/redux-ui/redux-ui-tests.ts index 5576a19b9d..63ac16c84e 100644 --- a/redux-ui/redux-ui-tests.ts +++ b/redux-ui/redux-ui-tests.ts @@ -1,7 +1,5 @@ -/// -/// - import * as React from 'react' +import * as Redux from 'redux' import ui, { ReduxUIProps, reducer } from 'redux-ui' type UIShape = { diff --git a/redux-ui/redux-ui.d.ts b/redux-ui/redux-ui.d.ts index 6114931320..f38cd16ec1 100644 --- a/redux-ui/redux-ui.d.ts +++ b/redux-ui/redux-ui.d.ts @@ -3,8 +3,6 @@ // Definitions by: Andy Shu Xin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// - declare module "redux-ui" { import * as Redux from 'redux'; diff --git a/redux-ui/tsconfig.json b/redux-ui/tsconfig.json new file mode 100644 index 0000000000..7bfc0fc3b7 --- /dev/null +++ b/redux-ui/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "experimentalDecorators": true + }, + "files": [ + "redux-ui.d.ts", + "redux-ui-tests.ts" + ] +} \ No newline at end of file diff --git a/restler/restler.d.ts b/restler/restler.d.ts index 389203066d..f33bf3f24f 100644 --- a/restler/restler.d.ts +++ b/restler/restler.d.ts @@ -3,7 +3,7 @@ // Definitions by: Cyril Schumacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "restler" { import * as http from "http"; diff --git a/restler/tsconfig.json b/restler/tsconfig.json new file mode 100644 index 0000000000..4d717eca0b --- /dev/null +++ b/restler/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "restler.d.ts", + "restler-tests.ts" + ] +} \ No newline at end of file diff --git a/rx-node/rx-node-tests.ts b/rx-node/rx-node-tests.ts index bd66ac10d5..13f6906107 100644 --- a/rx-node/rx-node-tests.ts +++ b/rx-node/rx-node-tests.ts @@ -3,9 +3,6 @@ // Definitions by: Andre Luiz dos Santos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// - { var source = Rx.Observable.return(42); var emitter = RxNode.toEventEmitter(source, 'data'); diff --git a/rx-node/rx-node.d.ts b/rx-node/rx-node.d.ts index 14af714359..8836fcee97 100644 --- a/rx-node/rx-node.d.ts +++ b/rx-node/rx-node.d.ts @@ -3,8 +3,8 @@ // Definitions by: Andre Luiz dos Santos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare namespace RxNode { diff --git a/rx-node/tsconfig.json b/rx-node/tsconfig.json new file mode 100644 index 0000000000..e3bd39f99b --- /dev/null +++ b/rx-node/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "rx-node.d.ts", + "rx-node-tests.ts" + ] +} \ No newline at end of file diff --git a/rx.wamp/rx-wamp.d.ts b/rx.wamp/index.d.ts similarity index 89% rename from rx.wamp/rx-wamp.d.ts rename to rx.wamp/index.d.ts index 839fa35120..1a8027c878 100644 --- a/rx.wamp/rx-wamp.d.ts +++ b/rx.wamp/index.d.ts @@ -3,8 +3,8 @@ // Definitions by: Elad Zelingher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +import autobahn = require("autobahn"); +import * as Rx from "rx"; interface IWampEvent { args?: any[]; @@ -40,8 +40,9 @@ interface IPubSubSubject extends Rx.Observable, Rx.Observer; } -// Patch ObservableStatic to contain observableWamp methods. -declare namespace Rx { - interface ObservableStatic extends IObservableWampStatic { - } -} \ No newline at end of file +export as namespace RxWamp; + +declare module "rx" { + // Patch ObservableStatic to contain observableWamp methods. + interface ObservableStatic extends IObservableWampStatic {} +} diff --git a/rx.wamp/rx-wamp-tests.ts b/rx.wamp/rx.wamp-tests.ts similarity index 97% rename from rx.wamp/rx-wamp-tests.ts rename to rx.wamp/rx.wamp-tests.ts index c51eff3744..31ec3bd442 100644 --- a/rx.wamp/rx-wamp-tests.ts +++ b/rx.wamp/rx.wamp-tests.ts @@ -1,5 +1,6 @@ -/// -/// +/// +import * as autobahn from "autobahn"; +import {IWampEvent} from "rx.wamp"; function nodeJS(session: autobahn.Session) { var sessionObservable = @@ -151,7 +152,7 @@ function weather_station_monitor(session: autobahn.Session) { .flatMap(readings => analyzer(readings)) .publish().refCount(); - //Warn of inclement weather coming in + //Warn of inclement weather coming in dailyForecast //only get warnings .filter(weather => (weather.warnings.length > 0)) diff --git a/rx.wamp/tsconfig.json b/rx.wamp/tsconfig.json new file mode 100644 index 0000000000..cbaff055f8 --- /dev/null +++ b/rx.wamp/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "rx.wamp-tests.ts" + ] +} \ No newline at end of file diff --git a/rx/rx.aggregates.d.ts b/rx/rx.aggregates.d.ts index 8dfc17634a..68b2ed50ec 100644 --- a/rx/rx.aggregates.d.ts +++ b/rx/rx.aggregates.d.ts @@ -3,7 +3,7 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Rx { export interface Observable { diff --git a/rx/rx.all.d.ts b/rx/rx.all.d.ts index 52f66882e4..404b364fd0 100644 --- a/rx/rx.all.d.ts +++ b/rx/rx.all.d.ts @@ -3,15 +3,15 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// -/// -/// -/// -/// -/// -/// +/// +/// +/// +/// +/// +/// +/// +/// +/// /// diff --git a/rx/rx.async.d.ts b/rx/rx.async.d.ts index ec7effa67b..582e94c723 100644 --- a/rx/rx.async.d.ts +++ b/rx/rx.async.d.ts @@ -3,7 +3,7 @@ // Definitions by: zoetrope , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare namespace Rx { diff --git a/rx/rx.binding.d.ts b/rx/rx.binding.d.ts index 3d6c3db48d..5dab889ca1 100644 --- a/rx/rx.binding.d.ts +++ b/rx/rx.binding.d.ts @@ -3,7 +3,7 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare module "rx.binding" { diff --git a/rx/rx.coincidence.d.ts b/rx/rx.coincidence.d.ts index b39f9ac103..a39f224367 100644 --- a/rx/rx.coincidence.d.ts +++ b/rx/rx.coincidence.d.ts @@ -3,7 +3,7 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare namespace Rx { diff --git a/rx/rx.experimental.d.ts b/rx/rx.experimental.d.ts index 9bfa2cc863..3f4dd40752 100644 --- a/rx/rx.experimental.d.ts +++ b/rx/rx.experimental.d.ts @@ -3,7 +3,7 @@ // Definitions by: Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Rx { diff --git a/rx/rx.joinpatterns.d.ts b/rx/rx.joinpatterns.d.ts index fa3c46b2ec..49080f7058 100644 --- a/rx/rx.joinpatterns.d.ts +++ b/rx/rx.joinpatterns.d.ts @@ -3,7 +3,7 @@ // Definitions by: Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Rx { diff --git a/rx/rx.testing.d.ts b/rx/rx.testing.d.ts index e654a33a2a..2415e3fe30 100644 --- a/rx/rx.testing.d.ts +++ b/rx/rx.testing.d.ts @@ -3,7 +3,7 @@ // Definitions by: Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare namespace Rx { diff --git a/rx/rx.time.d.ts b/rx/rx.time.d.ts index 2525756f7c..84f23b0cfe 100644 --- a/rx/rx.time.d.ts +++ b/rx/rx.time.d.ts @@ -3,7 +3,7 @@ // Definitions by: Carl de Billy , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// /// declare namespace Rx { diff --git a/rx/rx.virtualtime.d.ts b/rx/rx.virtualtime.d.ts index 3297703862..908eeebb6d 100644 --- a/rx/rx.virtualtime.d.ts +++ b/rx/rx.virtualtime.d.ts @@ -3,7 +3,7 @@ // Definitions by: gsino , Igor Oleinikov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace Rx { export interface VirtualTimeScheduler extends Scheduler { diff --git a/samchon-collection/samchon-collection-tests.ts b/samchon-collection/samchon-collection-tests.ts index 5744f11a7a..30724c8904 100644 --- a/samchon-collection/samchon-collection-tests.ts +++ b/samchon-collection/samchon-collection-tests.ts @@ -1,4 +1,2 @@ -/// - import collection = require("samchon-collection"); console.log(collection); \ No newline at end of file diff --git a/samchon-collection/samchon-collection.d.ts b/samchon-collection/samchon-collection.d.ts index 0bff8791f9..5f62a81d42 100644 --- a/samchon-collection/samchon-collection.d.ts +++ b/samchon-collection/samchon-collection.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "samchon-collection" { diff --git a/samchon-collection/tsconfig.json b/samchon-collection/tsconfig.json new file mode 100644 index 0000000000..a429882ac7 --- /dev/null +++ b/samchon-collection/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "samchon-collection.d.ts", + "samchon-collection-tests.ts" + ] +} \ No newline at end of file diff --git a/samchon-framework/samchon-framework.d.ts b/samchon-framework/index.d.ts similarity index 99% rename from samchon-framework/samchon-framework.d.ts rename to samchon-framework/index.d.ts index a6d03758dd..a2e621b024 100644 --- a/samchon-framework/samchon-framework.d.ts +++ b/samchon-framework/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "samchon-framework" { @@ -4620,12 +4620,12 @@ declare namespace samchon.protocol { class MyServer extends Something implements IServer { private server_base: IServerBase = new WebServerBase(this); - + public addClient(driver: IClientDriver): void { // WHAT TO DO WHEN A CLIENT HAS CONNECTED } - + public open(port: number): void { this.server_base.open(); diff --git a/samchon-framework/samchon-framework-tests.ts b/samchon-framework/samchon-framework-tests.ts index 88c2632a37..5a35470d4b 100644 --- a/samchon-framework/samchon-framework-tests.ts +++ b/samchon-framework/samchon-framework-tests.ts @@ -1,4 +1,2 @@ -/// - import samchon = require("samchon-framework"); console.log(samchon); \ No newline at end of file diff --git a/samchon-framework/tsconfig.json b/samchon-framework/tsconfig.json new file mode 100644 index 0000000000..95b43d51d8 --- /dev/null +++ b/samchon-framework/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "samchon-framework-tests.ts" + ] +} \ No newline at end of file diff --git a/samchon-library/samchon-library-tests.ts b/samchon-library/samchon-library-tests.ts index 186a2f0348..9f60d43b11 100644 --- a/samchon-library/samchon-library-tests.ts +++ b/samchon-library/samchon-library-tests.ts @@ -1,4 +1,2 @@ -/// - import library = require("samchon-library"); console.log(library); \ No newline at end of file diff --git a/samchon-library/samchon-library.d.ts b/samchon-library/samchon-library.d.ts index 1ae5be40e5..305a9c63ca 100644 --- a/samchon-library/samchon-library.d.ts +++ b/samchon-library/samchon-library.d.ts @@ -3,7 +3,7 @@ // Definitions by: Jeongho Nam // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "samchon-library" { diff --git a/samchon-library/tsconfig.json b/samchon-library/tsconfig.json new file mode 100644 index 0000000000..e0415f7dce --- /dev/null +++ b/samchon-library/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "samchon-library.d.ts", + "samchon-library-tests.ts" + ] +} \ No newline at end of file diff --git a/samlp/samlp-tests.ts b/samlp/samlp-tests.ts index 7039e1c949..8bb3399062 100644 --- a/samlp/samlp-tests.ts +++ b/samlp/samlp-tests.ts @@ -1,7 +1,3 @@ -/// -/// -/// - import * as fs from 'fs'; import * as path from 'path'; import * as express from 'express'; diff --git a/samlp/samlp.d.ts b/samlp/samlp.d.ts index 5d0ffef0d5..81b8ae5b60 100644 --- a/samlp/samlp.d.ts +++ b/samlp/samlp.d.ts @@ -3,8 +3,8 @@ // Definitions by: horiuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "samlp" { diff --git a/samlp/tsconfig.json b/samlp/tsconfig.json new file mode 100644 index 0000000000..b15ade33c8 --- /dev/null +++ b/samlp/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": false, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "samlp.d.ts", + "samlp-tests.ts" + ] +} \ No newline at end of file diff --git a/set-cookie-parser/set-cookie-parser-tests.ts b/set-cookie-parser/set-cookie-parser-tests.ts index 8734fdfcdb..91238ff929 100644 --- a/set-cookie-parser/set-cookie-parser-tests.ts +++ b/set-cookie-parser/set-cookie-parser-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as assert from "assert"; import * as http from "http"; import * as setCookie from "set-cookie-parser"; diff --git a/set-cookie-parser/set-cookie-parser.d.ts b/set-cookie-parser/set-cookie-parser.d.ts index 3cacde6043..9d78a76ce1 100644 --- a/set-cookie-parser/set-cookie-parser.d.ts +++ b/set-cookie-parser/set-cookie-parser.d.ts @@ -3,7 +3,7 @@ // Definitions by: Nick Paddock // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "set-cookie-parser" { import http = require("http"); diff --git a/set-cookie-parser/tsconfig.json b/set-cookie-parser/tsconfig.json new file mode 100644 index 0000000000..a913efaa2f --- /dev/null +++ b/set-cookie-parser/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "set-cookie-parser.d.ts", + "set-cookie-parser-tests.ts" + ] +} \ No newline at end of file diff --git a/sinon-as-promised/sinon-as-promised-tests.ts b/sinon-as-promised/sinon-as-promised-tests.ts index 97ff6aaa3c..b835fe9952 100644 --- a/sinon-as-promised/sinon-as-promised-tests.ts +++ b/sinon-as-promised/sinon-as-promised-tests.ts @@ -1,10 +1,11 @@ -/// +/// + function testResolve() { - sinon.stub().resolves('test val'); + Sinon.stub().resolves('test val'); } function testReject() { - sinon.stub().rejects('test val'); + Sinon.stub().rejects('test val'); } testResolve(); diff --git a/sinon-as-promised/sinon-as-promised.d.ts b/sinon-as-promised/sinon-as-promised.d.ts index 3a214ea254..ab75217011 100644 --- a/sinon-as-promised/sinon-as-promised.d.ts +++ b/sinon-as-promised/sinon-as-promised.d.ts @@ -3,11 +3,10 @@ // Definitions by: igrayson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +import * as s from "sinon"; -declare namespace Sinon { - - export interface SinonStub { +declare module "sinon" { + interface SinonStub { /** * When called, the stub will return a "thenable" object which will return a promise for the provided value. Any Promises/A+ compliant library will handle this object properly. @@ -15,9 +14,9 @@ declare namespace Sinon { resolves(value:any):SinonStub; /** - * When called, the stub will return a thenable which will return a reject promise with the provided err. If err is a string, it will be set as the message on an Error object. + * When called, the stub will return a thenable which ill return a reject promise with the provided err. If err is a string, it will be set as the message on an Error object. */ rejects(err:any):SinonStub; - } + } } diff --git a/sinon-as-promised/tsconfig.json b/sinon-as-promised/tsconfig.json new file mode 100644 index 0000000000..401bb42813 --- /dev/null +++ b/sinon-as-promised/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "sinon-as-promised.d.ts", + "sinon-as-promised-tests.ts" + ] +} \ No newline at end of file diff --git a/sinon/index.d.ts b/sinon/index.d.ts index 7ea857019a..3991db8aac 100644 --- a/sinon/index.d.ts +++ b/sinon/index.d.ts @@ -431,3 +431,4 @@ declare namespace Sinon { declare var Sinon: Sinon.SinonStatic; export = Sinon; +export as namespace Sinon; diff --git a/socket.io-parser/socket.io-parser-tests.ts b/socket.io-parser/socket.io-parser-tests.ts index 917f72500f..07646f48ce 100644 --- a/socket.io-parser/socket.io-parser-tests.ts +++ b/socket.io-parser/socket.io-parser-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as parser from 'socket.io-parser'; var encoder = new parser.Encoder(); var packet = { diff --git a/socket.io-parser/socket.io-parser.d.ts b/socket.io-parser/socket.io-parser.d.ts index 0c4903fda4..5f1a7a104e 100644 --- a/socket.io-parser/socket.io-parser.d.ts +++ b/socket.io-parser/socket.io-parser.d.ts @@ -3,7 +3,7 @@ // Definitions by: York Yao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "socket.io-parser" { namespace Parser { diff --git a/socket.io-parser/tsconfig.json b/socket.io-parser/tsconfig.json new file mode 100644 index 0000000000..3f1b76a17d --- /dev/null +++ b/socket.io-parser/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "socket.io-parser.d.ts", + "socket.io-parser-tests.ts" + ] +} \ No newline at end of file diff --git a/spectacle/spectacle-tests.tsx b/spectacle/spectacle-tests.tsx index f8c84b6455..5f0c959a50 100644 --- a/spectacle/spectacle-tests.tsx +++ b/spectacle/spectacle-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - /** * Spectacle Test Examples * diff --git a/spectacle/spectacle.d.ts b/spectacle/spectacle.d.ts index 05f8d9d528..55227fbb2c 100644 --- a/spectacle/spectacle.d.ts +++ b/spectacle/spectacle.d.ts @@ -3,7 +3,8 @@ // Definitions by: Zachary Maybury // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// + declare module "spectacle" { import * as React from "react"; diff --git a/spectacle/tsconfig.json b/spectacle/tsconfig.json new file mode 100644 index 0000000000..3c7af053b3 --- /dev/null +++ b/spectacle/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "spectacle.d.ts", + "spectacle-tests.tsx" + ] +} \ No newline at end of file diff --git a/split2/split2-tests.ts b/split2/split2-tests.ts index 2e09612c3b..35d0b58684 100644 --- a/split2/split2-tests.ts +++ b/split2/split2-tests.ts @@ -1,5 +1,3 @@ -/// -/// import * as split from 'split2'; import * as fs from 'fs'; import { Transform, TransformOptions } from 'stream'; diff --git a/split2/split2.d.ts b/split2/split2.d.ts index 4ba12ae478..251bcb01b5 100644 --- a/split2/split2.d.ts +++ b/split2/split2.d.ts @@ -3,7 +3,7 @@ // Definitions by: TANAKA Koichi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "split2" { import { Transform, TransformOptions } from 'stream'; diff --git a/split2/tsconfig.json b/split2/tsconfig.json new file mode 100644 index 0000000000..c53b9e6d26 --- /dev/null +++ b/split2/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "split2.d.ts", + "split2-tests.ts" + ] +} \ No newline at end of file diff --git a/sqs-consumer/sqs-consumer-tests.ts b/sqs-consumer/sqs-consumer-tests.ts index 516aeb6adf..7b44cff23e 100644 --- a/sqs-consumer/sqs-consumer-tests.ts +++ b/sqs-consumer/sqs-consumer-tests.ts @@ -1,11 +1,9 @@ -/// - import * as Consumer from "sqs-consumer"; var app = Consumer.create({ queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name', handleMessage: function (message, done) { - // do some work with `message` + // do some work with `message` done(); } }); @@ -20,9 +18,9 @@ var app2 = Consumer.create({ visibilityTimeout: 50, waitTimeSeconds: 50 }); - + app.on('error', function (err: any) { console.log(err.message); }); - + app.start(); diff --git a/sqs-consumer/sqs-consumer.d.ts b/sqs-consumer/sqs-consumer.d.ts index 8c2315d083..9d5121944f 100644 --- a/sqs-consumer/sqs-consumer.d.ts +++ b/sqs-consumer/sqs-consumer.d.ts @@ -3,18 +3,18 @@ // Definitions by: Daniel Chao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "sqs-consumer" { - + import { SQS } from "aws-sdk"; - + module SQSConsumer { - + interface MessageHandler { (message: SQS.Message, done: Function): any; } - + interface ConsumerOpts { queueUrl: string; handleMessage: MessageHandler; @@ -27,17 +27,17 @@ declare module "sqs-consumer" { authenticationErrorTimeout?: number; sqs?: SQS; } - + interface Consumer extends NodeJS.EventEmitter { start (): void; stop (): void; } - + interface ConsumerFactory { create(opts: ConsumerOpts): Consumer; } } const Consumer: SQSConsumer.ConsumerFactory; export = Consumer; - + } diff --git a/sqs-consumer/tsconfig.json b/sqs-consumer/tsconfig.json new file mode 100644 index 0000000000..b485ab29dd --- /dev/null +++ b/sqs-consumer/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "sqs-consumer.d.ts", + "sqs-consumer-tests.ts" + ] +} \ No newline at end of file diff --git a/sqs-producer/sqs-producer-tests.ts b/sqs-producer/sqs-producer-tests.ts index f224ab11fb..9c4a7afbdb 100644 --- a/sqs-producer/sqs-producer-tests.ts +++ b/sqs-producer/sqs-producer-tests.ts @@ -1,8 +1,5 @@ // Taken straight from sqs-producer's README.md -/// - - import * as Producer from "sqs-producer"; var producer = Producer.create({ diff --git a/sqs-producer/sqs-producer.d.ts b/sqs-producer/sqs-producer.d.ts index 10638f90c5..de41b0a03b 100644 --- a/sqs-producer/sqs-producer.d.ts +++ b/sqs-producer/sqs-producer.d.ts @@ -3,7 +3,7 @@ // Definitions by: Daniel Chao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "sqs-producer" { diff --git a/sqs-producer/tsconfig.json b/sqs-producer/tsconfig.json new file mode 100644 index 0000000000..375eb798b3 --- /dev/null +++ b/sqs-producer/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "sqs-producer.d.ts", + "sqs-producer-tests.ts" + ] +} \ No newline at end of file diff --git a/ssh2-sftp-client/ssh2-sftp-client-tests.ts b/ssh2-sftp-client/ssh2-sftp-client-tests.ts index 0c2709bf61..0c6817a064 100644 --- a/ssh2-sftp-client/ssh2-sftp-client-tests.ts +++ b/ssh2-sftp-client/ssh2-sftp-client-tests.ts @@ -1,5 +1,3 @@ -/// - import * as Client from 'ssh2-sftp-client'; var client = new Client(); diff --git a/ssh2-sftp-client/ssh2-sftp-client.d.ts b/ssh2-sftp-client/ssh2-sftp-client.d.ts index 1676ad0077..587e8f97f0 100644 --- a/ssh2-sftp-client/ssh2-sftp-client.d.ts +++ b/ssh2-sftp-client/ssh2-sftp-client.d.ts @@ -3,7 +3,7 @@ // Definitions by: igrayson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "ssh2-sftp-client" { import * as ssh2 from 'ssh2'; diff --git a/ssh2-sftp-client/tsconfig.json b/ssh2-sftp-client/tsconfig.json new file mode 100644 index 0000000000..205f36fe68 --- /dev/null +++ b/ssh2-sftp-client/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "ssh2-sftp-client.d.ts", + "ssh2-sftp-client-tests.ts" + ] +} \ No newline at end of file diff --git a/suitescript/suitescript.d.ts b/suitescript/index.d.ts similarity index 100% rename from suitescript/suitescript.d.ts rename to suitescript/index.d.ts diff --git a/swagger-express-middleware/swagger-express-middleware-tests.ts b/swagger-express-middleware/swagger-express-middleware-tests.ts index 2af3ab4d0c..cc6854915d 100644 --- a/swagger-express-middleware/swagger-express-middleware-tests.ts +++ b/swagger-express-middleware/swagger-express-middleware-tests.ts @@ -1,5 +1,3 @@ -/// - import * as express from "express"; import * as SwaggerExpressMiddleware from "swagger-express-middleware"; @@ -27,9 +25,9 @@ SwaggerExpressMiddleware("PetStore.yaml", app, (err: any, middleware: SwaggerExp }, raw:{ inflate:false, - limit:100 + limit:100 } - + } app.use( diff --git a/swagger-express-middleware/swagger-express-middleware.d.ts b/swagger-express-middleware/swagger-express-middleware.d.ts index 21e8324ff2..a782fee0d1 100644 --- a/swagger-express-middleware/swagger-express-middleware.d.ts +++ b/swagger-express-middleware/swagger-express-middleware.d.ts @@ -26,7 +26,7 @@ app.listen(8000, function () { =============================================== */ -/// +/// declare module "swagger-express-middleware" { import {Application, Router, RequestHandler, Request, Response} from "express"; @@ -41,21 +41,21 @@ declare module "swagger-express-middleware" { (err: any, middleware: SwaggerMiddleware): void; } export interface SwaggerMiddleware { - /** + /** * Annotates the HTTP request (the `req` object) with Swagger metadata. * This middleware populates Request.swagger */ metadata: MetadataSignature; - /** - * Handles CORS preflight requests and sets CORS headers for all requests according the Swagger API definition. + /** + * Handles CORS preflight requests and sets CORS headers for all requests according the Swagger API definition. */ CORS: CORSSignature; - /** - * Serves the Swagger API file(s) in JSON and YAML formats, so they can be used with third-party front-end tools like Swagger UI and Swagger Editor. + /** + * Serves the Swagger API file(s) in JSON and YAML formats, so they can be used with third-party front-end tools like Swagger UI and Swagger Editor. */ files: FilesSignature; - /** - * Parses the HTTP request into typed values. + /** + * Parses the HTTP request into typed values. */ parseRequest: ParseRequestSignature; /** @@ -116,7 +116,7 @@ declare module "swagger-express-middleware" { options?: ParseRequestOptions): RequestHandler ( /** - * An Express Application or Router. + * An Express Application or Router. * If provided, this will be used to register path-param middleware via Router.Param */ router: Application | Router, @@ -158,7 +158,7 @@ declare module "swagger-express-middleware" { */ multipart?: MulterOptions } - + interface MulterOptions{ /** The destination directory for the uploaded files. */ dest?: string; @@ -183,14 +183,14 @@ declare module "swagger-express-middleware" { }; /** A function to control which files to upload and which to skip. */ fileFilter?: (req: Request, file: File, callback: (error: Error, acceptFile: boolean) => void) => void; - + } - + interface StorageEngine { _handleFile(req: Request, file: File, callback: (error?: any, info?: File) => void): void; _removeFile(req: Request, file: File, callback: (error: Error) => void): void; } - + export interface File { /** Field name specified in the form */ fieldname: string; @@ -218,15 +218,15 @@ declare module "swagger-express-middleware" { */ inflate?: boolean; /** - * Controls the maximum request body size. If this is a number, then the value specifies the number of bytes; + * Controls the maximum request body size. If this is a number, then the value specifies the number of bytes; * if it is a string, the value is passed to the bytes library for parsing. Defaults to '100kb'. */ limit?: string | number; /** - * The type option is used to determine what media type the middleware will parse. - * This option can be a function or a string. + * The type option is used to determine what media type the middleware will parse. + * This option can be a function or a string. * If a string, type option is passed directly to the type-is library and this can be an extension name (like bin), a mime type (like application/octet-stream), or a mime type with a wildcard (like * /* or application/*). - * If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. + * If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. * Defaults to application/octet-stream. */ type?: ((req: Request) => string) | string @@ -238,10 +238,10 @@ declare module "swagger-express-middleware" { } interface CookieParserOptionItem { - /** - * A string or array used for signing cookies. - * This is optional and if not specified, will not parse signed cookies. - * If a string is provided, this is used as the secret. + /** + * A string or array used for signing cookies. + * This is optional and if not specified, will not parse signed cookies. + * If a string is provided, this is used as the secret. * If an array is provided, an attempt will be made to unsign the cookie with each secret in order. */ secret?: string | Array @@ -257,20 +257,20 @@ declare module "swagger-express-middleware" { */ inflate?: boolean; /** - * Controls the maximum request body size. - * If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing. + * Controls the maximum request body size. + * If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing. * Defaults to '100kb' */ limit?: string | number; /** - * The type option is used to determine what media type the middleware will parse. - * This option can be a function or a string. - * If a string, type option is passed directly to the type-is library and this can be an extension name (like json), a mime type (like application/json), or a mime * type with a wildcard (like * /* or * /json). + * The type option is used to determine what media type the middleware will parse. + * This option can be a function or a string. + * If a string, type option is passed directly to the type-is library and this can be an extension name (like json), a mime type (like application/json), or a mime * type with a wildcard (like * /* or * /json). * If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. Defaults to application/json */ type?: ((req: Request) => string) | string /** - * The verify option, if supplied, is called as verify(req, res, buf, encoding), where buf is a Buffer of the raw request body and encoding is the encoding of the request. + * The verify option, if supplied, is called as verify(req, res, buf, encoding), where buf is a Buffer of the raw request body and encoding is the encoding of the request. * The parsing can be aborted by throwing an error. */ verify?: (req: Request, res: Response, buf: Buffer, encoding: string) => void; @@ -290,15 +290,15 @@ declare module "swagger-express-middleware" { */ inflate?: boolean; /** - * Controls the maximum request body size. - * If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing. + * Controls the maximum request body size. + * If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing. * Defaults to '100kb' */ limit?: string | number; /** - * The type option is used to determine what media type the middleware will parse. - * This option can be a function or a string. - * If a string, type option is passed directly to the type-is library and this can be an extension name (like txt), a mime type (like text/plain), or a mime type * with a wildcard (like * /* or text/*). + * The type option is used to determine what media type the middleware will parse. + * This option can be a function or a string. + * If a string, type option is passed directly to the type-is library and this can be an extension name (like txt), a mime type (like text/plain), or a mime type * with a wildcard (like * /* or text/*). * If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. Defaults to text/plain. */ type?: ((req: Request) => string) | string @@ -318,17 +318,17 @@ declare module "swagger-express-middleware" { */ inflate?: boolean; /** - * Controls the maximum request body size. - * If this is a number, then the value specifies the number of bytes; - * if it is a string, the value is passed to the bytes library for parsing. + * Controls the maximum request body size. + * If this is a number, then the value specifies the number of bytes; + * if it is a string, the value is passed to the bytes library for parsing. * Defaults to '100kb'. */ limit?: string | number; /** - * The type option is used to determine what media type the middleware will parse. - * This option can be a function or a string. - * If a string, type option is passed directly to the type-is library and this can be an extension name (like urlencoded), a mime type (like application/x-www-form-urlencoded), - * or a mime type with a wildcard (like * /x-www-form-urlencoded). If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. + * The type option is used to determine what media type the middleware will parse. + * This option can be a function or a string. + * If a string, type option is passed directly to the type-is library and this can be an extension name (like urlencoded), a mime type (like application/x-www-form-urlencoded), + * or a mime type with a wildcard (like * /x-www-form-urlencoded). If a function, the type option is called as fn(req) and the request is parsed if it returns a truthy value. * Defaults to application/x-www-form-urlencoded. */ type?: ((req: Request) => string) | string diff --git a/swagger-express-middleware/tsconfig.json b/swagger-express-middleware/tsconfig.json new file mode 100644 index 0000000000..b9091e6829 --- /dev/null +++ b/swagger-express-middleware/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "swagger-express-middleware.d.ts", + "swagger-express-middleware-tests.ts" + ] +} \ No newline at end of file diff --git a/tinder/tinder-tests.ts b/tinder/tinder-tests.ts index 12b8e6f071..03da9dec10 100644 --- a/tinder/tinder-tests.ts +++ b/tinder/tinder-tests.ts @@ -1,5 +1,3 @@ -/// - import tinder = require('tinder'); var client : tinder.TinderClient = new tinder.TinderClient(); @@ -7,7 +5,7 @@ client.authorize( '', '', function () { - + client.getRecommendations(10, (error, data) => { var results = data.results; results.forEach((recommendation) => { @@ -22,13 +20,13 @@ client.authorize( }) }); }); - + client.getHistory((error, history)=>{ if (history.matches && history.matches.length) { console.log(history.matches[0].messages); } }); - + client.getUpdates((error, updates)=>{ if (updates.matches && updates.matches.length) { console.log(updates.matches); diff --git a/tinder/tinder.d.ts b/tinder/tinder.d.ts index 9cbc19b360..94aa57fd62 100644 --- a/tinder/tinder.d.ts +++ b/tinder/tinder.d.ts @@ -1,9 +1,9 @@ -// Type definitions for tinder 1.19.0 +// Type definitions for tinder 1.19.0 // Project: https://github.com/tinderjs/tinderjs // Definitions by: Matej Drolc // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module 'tinder' { @@ -91,14 +91,14 @@ declare module 'tinder' { unmatch(matchId: string, callback: Callback): void; /** - * Gets a list of new updates. This will be things like new messages, users who liked you, etc. + * Gets a list of new updates. This will be things like new messages, users who liked you, etc. * @param {Function} callback the callback to invoke when the request completes */ getUpdates(callback: Callback): void; /** * Gets the entire history for the current account (all matches, messages, blocks, etc.) - * + * * NOTE: Old messages seem to not be returned after a certain threshold. Not yet * sure what exactly that timeout is. The official client seems to get this update * once when the app is installed then cache the results and only rely on the @@ -108,7 +108,7 @@ declare module 'tinder' { getHistory(callback: Callback): void; /** - * Updates the geographical position for the current account + * Updates the geographical position for the current account * @param {Number} lon the longitude * @param {Number} lat the latitutde * @param {Function} callback the callback to invoke when the request completes @@ -219,7 +219,7 @@ declare module 'tinder' { /** * Get a share URL for a user - * + * * @param {String} userId the id of the user * @param {Function} callback the callback to invoke when the request completes */ @@ -227,7 +227,7 @@ declare module 'tinder' { /** * Report a user - * + * * @param {String} userId the id of the user * @param {Number} causeId one of 4 (inappropriate photos), 1 (spam), or 0 (other) * @param {String} causeText optional reason for report when causeId is 0 (other) @@ -237,7 +237,7 @@ declare module 'tinder' { /** * Create a web username for the current account - * + * * @param {String} userName the username to request be created * @param {Function} callback the callback to invoke when the request completes */ @@ -245,7 +245,7 @@ declare module 'tinder' { /** * Change a web username for the current account if it's already been set - * + * * @param {String} userName the username to request be created * @param {Function} callback the callback to invoke when the request completes */ @@ -253,21 +253,21 @@ declare module 'tinder' { /** * Deletes the existing web username for the current account - * + * * @param {Function} callback the callback to invoke when the request completes */ deleteUsername(username: string, callback: Callback): void; /** - * Update the passport location + * Update the passport location * @param {Number} lon the longitude * @param {Number} lat the latitutde * @param {Function} callback the callback to invoke when the request completes */ updatePassport(latitude: string, longitude: string, callback: Callback): void; - + /** - * Reset the passport location + * Reset the passport location * @param {Function} callback the callback to invoke when the request completes */ resetPassport(callback: Callback): void; diff --git a/tinder/tsconfig.json b/tinder/tsconfig.json new file mode 100644 index 0000000000..891c7e47a7 --- /dev/null +++ b/tinder/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "tinder.d.ts", + "tinder-tests.ts" + ] +} \ No newline at end of file diff --git a/torrent-stream/torrent-stream-tests.ts b/torrent-stream/torrent-stream-tests.ts index f69b7f968f..2b41b2e744 100644 --- a/torrent-stream/torrent-stream-tests.ts +++ b/torrent-stream/torrent-stream-tests.ts @@ -1,5 +1,3 @@ -/// - import * as torrentStream from "torrent-stream"; let engine: TorrentStream.TorrentEngine = torrentStream("magnet"); diff --git a/torrent-stream/torrent-stream.d.ts b/torrent-stream/torrent-stream.d.ts index bf804f1d73..468088642f 100644 --- a/torrent-stream/torrent-stream.d.ts +++ b/torrent-stream/torrent-stream.d.ts @@ -3,7 +3,7 @@ // Definitions by: Xavier Stouder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare namespace TorrentStream { interface TorrentEngine { @@ -16,7 +16,7 @@ declare namespace TorrentStream { listen(port: number, callback: () => void): void; swarm: Swarm; infoHash: string; - + // Events on(event: "ready" | "torrent" | "idle", callback: Function): void; on(event: "download", callback: (pieceIndex: number) => void): void; @@ -41,7 +41,7 @@ declare namespace TorrentStream { name: string; path: string; length: number; - + select(): void; deselect(): void; createReadStream(options?: ReadStreamOptions): any; diff --git a/torrent-stream/tsconfig.json b/torrent-stream/tsconfig.json new file mode 100644 index 0000000000..d19142a503 --- /dev/null +++ b/torrent-stream/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "torrent-stream.d.ts", + "torrent-stream-tests.ts" + ] +} \ No newline at end of file diff --git a/twilio/index.d.ts b/twilio/index.d.ts index 9d9316ba2b..62d0a390cd 100644 --- a/twilio/index.d.ts +++ b/twilio/index.d.ts @@ -3,9 +3,9 @@ // Definitions by: nickiannone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// +/// +/// +/// import * as express from 'express'; import * as Http from 'http'; @@ -166,7 +166,7 @@ declare module twilio { clientName: string; outgoingScopeParams: any; scopeParams: any; - + constructor(sid?: string, tkn?: string); allowClientIncoming(clientName: string): Capability; @@ -319,7 +319,7 @@ declare module twilio { allowWorkerActivityUpdates(): void; allowWorkerFetchAttributes(): void; allowTaskReservationUpdates(): void; - + addPolicy(url: string, method: string, allowed?: boolean, queryFilter?: any, postFilter?: any): void; allow(url: string, method: string, queryFilter?: any, postFilter?: any): void; deny(url: string, method: string, queryFilter?: any, postFilter?: any): void; @@ -380,7 +380,7 @@ declare module twilio { } export interface TwimlMethod { (arg1: any | string | TwimlCallback, arg2?: any | string | TwimlCallback): Node } - + export interface TwimlCallback { (node?: Node): void; } export class Node implements NodeOptions { @@ -435,7 +435,7 @@ declare module twilio { export interface WebhookExpressOptions { // The full URL (with query string) you used to configure the webhook with Twilio - overrides host/protocol options url?: string; - + // manually specify the host name used by Twilio in a number's webhook config host?: string; diff --git a/twit/tsconfig.json b/twit/tsconfig.json new file mode 100644 index 0000000000..0b866f484a --- /dev/null +++ b/twit/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "twit.d.ts", + "twit-tests.ts" + ] +} \ No newline at end of file diff --git a/twit/twit-tests.ts b/twit/twit-tests.ts index b2d4dc83d9..e346771f35 100644 --- a/twit/twit-tests.ts +++ b/twit/twit-tests.ts @@ -1,5 +1,3 @@ -/// - import * as Twit from 'twit'; const t = new Twit( { diff --git a/twit/twit.d.ts b/twit/twit.d.ts index 612d4b3071..e5ad8b5962 100644 --- a/twit/twit.d.ts +++ b/twit/twit.d.ts @@ -3,8 +3,8 @@ // Definitions by: Volox // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module 'twit' { import { IncomingMessage } from 'http'; diff --git a/typescript-stl/typescript-stl.d.ts b/typescript-stl/index.d.ts similarity index 100% rename from typescript-stl/typescript-stl.d.ts rename to typescript-stl/index.d.ts diff --git a/v8-profiler/tsconfig.json b/v8-profiler/tsconfig.json new file mode 100644 index 0000000000..d7b22ff846 --- /dev/null +++ b/v8-profiler/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "v8-profiler.d.ts", + "v8-profiler-tests.ts" + ] +} \ No newline at end of file diff --git a/v8-profiler/v8-profiler.d.ts b/v8-profiler/v8-profiler.d.ts index ca22a60af7..2f5602b051 100644 --- a/v8-profiler/v8-profiler.d.ts +++ b/v8-profiler/v8-profiler.d.ts @@ -8,7 +8,7 @@ profiler.startProfiling(); =============================================== */ -/// +/// declare module "v8-profiler" { import * as fs from "fs"; diff --git a/victory/tsconfig.json b/victory/tsconfig.json new file mode 100644 index 0000000000..35f1bf290d --- /dev/null +++ b/victory/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + + "jsx": "react" + }, + "files": [ + "victory.d.ts", + "victory-tests.tsx" + ] +} \ No newline at end of file diff --git a/victory/victory-tests.tsx b/victory/victory-tests.tsx index 6be99c875a..7947f5f0ec 100644 --- a/victory/victory-tests.tsx +++ b/victory/victory-tests.tsx @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import { VictoryAnimation, diff --git a/victory/victory.d.ts b/victory/victory.d.ts index 852fde5f7d..9be6990469 100644 --- a/victory/victory.d.ts +++ b/victory/victory.d.ts @@ -3,7 +3,8 @@ // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// + declare module "victory" { import * as React from "react"; /** @@ -108,7 +109,7 @@ declare module "victory" { * The events prop attaches arbitrary event handlers to the label component. * Event handlers are currently only called with their corresponding events. */ - events?: React.DOMAttributes; + events?: React.DOMAttributes; /** * All Victory components will pass a text prop to their label component. * This defines the content of the label when child nodes are absent. It will be ignored if children are provided. @@ -199,7 +200,7 @@ declare module "victory" { * data. `scale.x.invert(evt.offsetX)`. * @examples {{ onClick: (evt) => alert(`x: ${evt.clientX}, y: ${evt.clientY}`)}} */ - events?: React.DOMAttributes; + events?: React.DOMAttributes; /** * The title prop specifies the title to be applied to the SVG to assist * accessibility for screen readers. The more descriptive this title is, the more @@ -339,8 +340,8 @@ declare module "victory" { */ eventHandlers: { [key: string]: { - (event: React.SyntheticEvent): EventCallbackInterface } | - { (event: React.SyntheticEvent): EventCallbackInterface[] + (event: React.SyntheticEvent): EventCallbackInterface } | + { (event: React.SyntheticEvent): EventCallbackInterface[] } }; } diff --git a/watchify/index.d.ts b/watchify/index.d.ts new file mode 100644 index 0000000000..d4355f3efb --- /dev/null +++ b/watchify/index.d.ts @@ -0,0 +1,48 @@ +// Type definitions for watchify v3.7.0 +// Project: https://github.com/substack/watchify +// Definitions by: TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import Browserify = require("browserify"); + +declare var Watchify: Watchify.Constructor; + +/** Watch mode for browserify builds. + * Update any source file and your browserify bundle will be recompiled on the spot + */ +declare namespace Watchify { + + /** Watch mode for browserify builds. + * Update any source file and your browserify bundle will be recompiled on the spot + */ + export interface Constructor { + args: { cache: any; packageCache: any; }; + + (b: T, opts?: Watchify.Options): T; + (b: Browserify.BrowserifyObject, opts?: Watchify.Options): Browserify.BrowserifyObject; + } + + + export interface Options { + /** The amount of time in milliseconds to wait before emitting an "update" event after a change. + * Default: 100 + */ + delay?: number; + + /** Ignores monitoring files for changes. If set to true, then ** /node_modules/ ** will be ignored. For other possible values see Chokidar's documentation on "ignored" + * Also see anymatch package: https://github.com/es128/anymatch#usage + */ + ignoreWatch?: boolean | (string | RegExp | ((...values: any[]) => boolean) | (string | RegExp | ((...values: any[]) => boolean))[]); + + /** Enables polling to monitor for changes. If set to true, then a polling interval of 100 ms is used. + * If set to a number, then that amount of milliseconds will be the polling interval. For more info see + * Chokidar's documentation on "usePolling" and "interval". + * This option is useful if you're watching an NFS volume + * Also see chokidar package: https://github.com/paulmillr/chokidar#path-filtering + */ + poll?: number; + } + +} + +export = Watchify; diff --git a/watchify/tsconfig.json b/watchify/tsconfig.json new file mode 100644 index 0000000000..4ee0c6440e --- /dev/null +++ b/watchify/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "watchify-tests.ts" + ] +} \ No newline at end of file diff --git a/watchify/watchify-tests.ts b/watchify/watchify-tests.ts index 278697ca2e..5d3ff1dabf 100644 --- a/watchify/watchify-tests.ts +++ b/watchify/watchify-tests.ts @@ -1,5 +1,3 @@ -/// - import browserify = require("browserify"); import watchify = require("watchify"); diff --git a/watchify/watchify.d.ts b/watchify/watchify.d.ts deleted file mode 100644 index cad9cbf3af..0000000000 --- a/watchify/watchify.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Type definitions for watchify v3.7.0 -// Project: https://github.com/substack/watchify -// Definitions by: TeamworkGuy2 -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -/// - -declare module 'watchify' { - - var Watchify: Watchify.Constructor; - - /** Watch mode for browserify builds. - * Update any source file and your browserify bundle will be recompiled on the spot - */ - module Watchify { - - /** Watch mode for browserify builds. - * Update any source file and your browserify bundle will be recompiled on the spot - */ - export interface Constructor { - args: { cache: any; packageCache: any; }; - - (b: T, opts?: Watchify.Options): T; - (b: Browserify.BrowserifyObject, opts?: Watchify.Options): Browserify.BrowserifyObject; - } - - - export interface Options { - /** The amount of time in milliseconds to wait before emitting an "update" event after a change. - * Default: 100 - */ - delay?: number; - - /** Ignores monitoring files for changes. If set to true, then ** /node_modules/ ** will be ignored. For other possible values see Chokidar's documentation on "ignored" - * Also see anymatch package: https://github.com/es128/anymatch#usage - */ - ignoreWatch?: boolean | (string | RegExp | ((...values: any[]) => boolean) | (string | RegExp | ((...values: any[]) => boolean))[]); - - /** Enables polling to monitor for changes. If set to true, then a polling interval of 100 ms is used. - * If set to a number, then that amount of milliseconds will be the polling interval. For more info see - * Chokidar's documentation on "usePolling" and "interval". - * This option is useful if you're watching an NFS volume - * Also see chokidar package: https://github.com/paulmillr/chokidar#path-filtering - */ - poll?: number; - } - - } - - export = Watchify; -} diff --git a/webpack-dev-server/tsconfig.json b/webpack-dev-server/tsconfig.json new file mode 100644 index 0000000000..2332ded163 --- /dev/null +++ b/webpack-dev-server/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "webpack-dev-server.d.ts", + "webpack-dev-server-tests.ts" + ] +} \ No newline at end of file diff --git a/webpack-dev-server/webpack-dev-server-tests.ts b/webpack-dev-server/webpack-dev-server-tests.ts index df805219f9..21af59885a 100644 --- a/webpack-dev-server/webpack-dev-server-tests.ts +++ b/webpack-dev-server/webpack-dev-server-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as webpack from 'webpack'; import * as WebpackDevServer from 'webpack-dev-server'; var compiler = webpack({}); @@ -21,7 +18,7 @@ server = new WebpackDevServer(compiler, { // Enable special support for Hot Module Replacement // Page is no longer updated, but a "webpackHotUpdate" message is send to the content // Use "webpack/hot/dev-server" as additional module in your entry point - // Note: this does _not_ add the `HotModuleReplacementPlugin` like the CLI option does. + // Note: this does _not_ add the `HotModuleReplacementPlugin` like the CLI option does. // Set this as true if you want to access dev server from arbitrary url. // This is handy if you are using a html5 router. diff --git a/webpack-dev-server/webpack-dev-server.d.ts b/webpack-dev-server/webpack-dev-server.d.ts index 41abe0f871..4be0870d7a 100644 --- a/webpack-dev-server/webpack-dev-server.d.ts +++ b/webpack-dev-server/webpack-dev-server.d.ts @@ -3,10 +3,6 @@ // Definitions by: maestroh // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// -/// - declare module "webpack-dev-server" { import * as webpack from 'webpack'; import * as core from 'express-serve-static-core'; diff --git a/webpack-fail-plugin/tsconfig.json b/webpack-fail-plugin/tsconfig.json new file mode 100644 index 0000000000..b2dcb556ba --- /dev/null +++ b/webpack-fail-plugin/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "webpack-fail-plugin.d.ts", + "webpack-fail-plugin-tests.ts" + ] +} \ No newline at end of file diff --git a/webpack-fail-plugin/webpack-fail-plugin-tests.ts b/webpack-fail-plugin/webpack-fail-plugin-tests.ts index 4b7ab67b22..cda6265f33 100644 --- a/webpack-fail-plugin/webpack-fail-plugin-tests.ts +++ b/webpack-fail-plugin/webpack-fail-plugin-tests.ts @@ -1,4 +1,3 @@ -/// import * as Webpack from "webpack"; import FailPlugin = require("webpack-fail-plugin"); diff --git a/webpack-fail-plugin/webpack-fail-plugin.d.ts b/webpack-fail-plugin/webpack-fail-plugin.d.ts index abfaea11d6..d0436a3b89 100644 --- a/webpack-fail-plugin/webpack-fail-plugin.d.ts +++ b/webpack-fail-plugin/webpack-fail-plugin.d.ts @@ -3,7 +3,7 @@ // Definitions by: Simon Hartcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "webpack-fail-plugin" { import {Plugin} from "webpack"; diff --git a/webpack-merge/tsconfig.json b/webpack-merge/tsconfig.json new file mode 100644 index 0000000000..9a790a0d67 --- /dev/null +++ b/webpack-merge/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "webpack-merge.d.ts", + "webpack-merge-tests.ts" + ] +} \ No newline at end of file diff --git a/webpack-merge/webpack-merge-tests.ts b/webpack-merge/webpack-merge-tests.ts index 1d39e0e7ab..bc40806a23 100644 --- a/webpack-merge/webpack-merge-tests.ts +++ b/webpack-merge/webpack-merge-tests.ts @@ -1,5 +1,3 @@ -/// - import merge = require("webpack-merge"); import {Configuration} from "webpack"; diff --git a/webpack-merge/webpack-merge.d.ts b/webpack-merge/webpack-merge.d.ts index 3d2683fa85..18aaca1f36 100644 --- a/webpack-merge/webpack-merge.d.ts +++ b/webpack-merge/webpack-merge.d.ts @@ -3,7 +3,7 @@ // Definitions by: Simon Hartcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "webpack-merge" { import {Configuration} from "webpack"; diff --git a/webpack-stream/tsconfig.json b/webpack-stream/tsconfig.json new file mode 100644 index 0000000000..22cb00921f --- /dev/null +++ b/webpack-stream/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "webpack-stream.d.ts", + "webpack-stream-tests.ts" + ] +} \ No newline at end of file diff --git a/webpack-stream/webpack-stream-tests.ts b/webpack-stream/webpack-stream-tests.ts index bd57e1c735..9f13f53b02 100644 --- a/webpack-stream/webpack-stream-tests.ts +++ b/webpack-stream/webpack-stream-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import webpackStream = require("webpack-stream"); import webpack = require("webpack"); diff --git a/webpack-stream/webpack-stream.d.ts b/webpack-stream/webpack-stream.d.ts index c98c0372dd..9a36906a03 100644 --- a/webpack-stream/webpack-stream.d.ts +++ b/webpack-stream/webpack-stream.d.ts @@ -3,8 +3,8 @@ // Definitions by: Ian Clanton-Thuon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// -/// +/// +/// declare module "webpack-stream" { import webpack = require("webpack"); diff --git a/webpack-validator/tsconfig.json b/webpack-validator/tsconfig.json new file mode 100644 index 0000000000..6361cb196b --- /dev/null +++ b/webpack-validator/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "webpack-validator.d.ts", + "webpack-validator-tests.ts" + ] +} \ No newline at end of file diff --git a/webpack-validator/webpack-validator-tests.ts b/webpack-validator/webpack-validator-tests.ts index f64b478b2e..9635ae2060 100644 --- a/webpack-validator/webpack-validator-tests.ts +++ b/webpack-validator/webpack-validator-tests.ts @@ -1,5 +1,3 @@ -/// - import {Configuration} from "webpack"; import validate = require("webpack-validator"); diff --git a/webpack-validator/webpack-validator.d.ts b/webpack-validator/webpack-validator.d.ts index 3c03627bb3..850aadd654 100644 --- a/webpack-validator/webpack-validator.d.ts +++ b/webpack-validator/webpack-validator.d.ts @@ -3,7 +3,7 @@ // Definitions by: Simon Hartcher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "webpack-validator" { import {Configuration} from "webpack"; diff --git a/whatwg-fetch/index.d.ts b/whatwg-fetch/index.d.ts index 793244976e..6e0953656f 100644 --- a/whatwg-fetch/index.d.ts +++ b/whatwg-fetch/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ryan Graham , Kagami Sascha Rosylight // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// interface Window { fetch(url: RequestInfo, init?: RequestInit): Promise; diff --git a/whatwg-fetch/whatwg-fetch-tests.ts b/whatwg-fetch/whatwg-fetch-tests.ts index 7434c8372b..7e35c607b1 100644 --- a/whatwg-fetch/whatwg-fetch-tests.ts +++ b/whatwg-fetch/whatwg-fetch-tests.ts @@ -7,7 +7,7 @@ function test_HeadersCopiedFromHeaders1() { } function test_HeadersCopiedFromHash1() { - var source:HeadersMap = { + var source:HeadersInit = { 'Content-Type': 'application/json' }; return new Headers(source); @@ -20,7 +20,7 @@ function test_HeadersCopiedFromHeaders2() { } function test_HeadersCopiedFromHash2() { - var source:HeadersMap = { + var source:HeadersInit = { 'Content-Type': 'application/json' }; return new Headers(source); @@ -33,7 +33,7 @@ function test_HeadersCopiedFromHeaders3() { } function test_HeadersCopiedFromHash3() { - var source:HeadersMap = { + var source:HeadersInit = { 'Content-Type': 'application/json' }; return new Headers(source); diff --git a/whatwg-streams/whatwg-streams.d.ts b/whatwg-streams/index.d.ts similarity index 100% rename from whatwg-streams/whatwg-streams.d.ts rename to whatwg-streams/index.d.ts diff --git a/whatwg-streams/tsconfig.json b/whatwg-streams/tsconfig.json new file mode 100644 index 0000000000..9c6a6ad155 --- /dev/null +++ b/whatwg-streams/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "whatwg-streams-tests.ts" + ] +} \ No newline at end of file diff --git a/whatwg-streams/whatwg-streams-tests.ts b/whatwg-streams/whatwg-streams-tests.ts index d1e23eda98..ce5eb2b256 100644 --- a/whatwg-streams/whatwg-streams-tests.ts +++ b/whatwg-streams/whatwg-streams-tests.ts @@ -1,6 +1,4 @@ -/// - -function makeReadableWebSocketStream(url: string, protocols: string[]) { +function makeReadableWebSocketStream(url: string, protocols: string[]) { const ws = new WebSocket(url, protocols); ws.binaryType = "arraybuffer"; @@ -161,7 +159,7 @@ class WebSocketSink implements WritableStreamSink { this._ws.addEventListener("error", () => { controller.error(new Error("The WebSocket errored!")); }); - + return new Promise(resolve => this._ws.onopen = () => resolve()); } diff --git a/why-did-you-update/tsconfig.json b/why-did-you-update/tsconfig.json new file mode 100644 index 0000000000..4ce50757f7 --- /dev/null +++ b/why-did-you-update/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "why-did-you-update.d.ts", + "why-did-you-update-tests.ts" + ] +} \ No newline at end of file diff --git a/why-did-you-update/why-did-you-update-tests.ts b/why-did-you-update/why-did-you-update-tests.ts index 7c8432d61c..d628e796c6 100644 --- a/why-did-you-update/why-did-you-update-tests.ts +++ b/why-did-you-update/why-did-you-update-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import * as React from "react"; import {whyDidYouUpdate} from "why-did-you-update"; diff --git a/why-did-you-update/why-did-you-update.d.ts b/why-did-you-update/why-did-you-update.d.ts index da94eddb3e..09b2754438 100644 --- a/why-did-you-update/why-did-you-update.d.ts +++ b/why-did-you-update/why-did-you-update.d.ts @@ -3,13 +3,13 @@ // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module "why-did-you-update" { interface Options { include?: RegExp; exclude?: RegExp; } - export function whyDidYouUpdate(react: typeof __React, options?: Options): void; + export function whyDidYouUpdate(react: typeof React, options?: Options): void; } diff --git a/winston-dynamodb/tsconfig.json b/winston-dynamodb/tsconfig.json new file mode 100644 index 0000000000..c5b2035097 --- /dev/null +++ b/winston-dynamodb/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "winston-dynamodb.d.ts", + "winston-dynamodb-tests.ts" + ] +} \ No newline at end of file diff --git a/winston-dynamodb/winston-dynamodb-tests.ts b/winston-dynamodb/winston-dynamodb-tests.ts index 00f5cdfa59..a81cdf32e1 100644 --- a/winston-dynamodb/winston-dynamodb-tests.ts +++ b/winston-dynamodb/winston-dynamodb-tests.ts @@ -1,6 +1,3 @@ -/// -/// - import winston = require('winston'); require('winston-dynamodb').DynamoDB; diff --git a/winston-dynamodb/winston-dynamodb.d.ts b/winston-dynamodb/winston-dynamodb.d.ts index 7d4c2e9544..a9d7e9e713 100644 --- a/winston-dynamodb/winston-dynamodb.d.ts +++ b/winston-dynamodb/winston-dynamodb.d.ts @@ -3,7 +3,7 @@ // Definitions by: nickiannone // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// import * as winston from 'winston'; import { TransportInstance } from 'winston'; diff --git a/xmlpoke/tsconfig.json b/xmlpoke/tsconfig.json new file mode 100644 index 0000000000..7157d9aad3 --- /dev/null +++ b/xmlpoke/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "xmlpoke.d.ts", + "xmlpoke-tests.ts" + ] +} \ No newline at end of file diff --git a/xmlpoke/xmlpoke-tests.ts b/xmlpoke/xmlpoke-tests.ts index b77463f164..3c82b846a6 100644 --- a/xmlpoke/xmlpoke-tests.ts +++ b/xmlpoke/xmlpoke-tests.ts @@ -1,5 +1,4 @@ -/// -/// +/// // tsc xmlpoke-tests.ts && node xmlpoke-tests.js @@ -13,7 +12,7 @@ result = xmlpoke('', xml => xml.add('/a/b', 'c')); assert.equal(result, 'c'); // add with xpath, Transform -const addfn: XmlPoke.Transform = (node, value) => 'c'; +const addfn: XmlPoke.Transform = (node, value) => 'c'; result = xmlpoke('', xml => xml.add('/a/b', addfn)); assert.equal(result, 'c'); @@ -78,6 +77,6 @@ result = xmlpoke('', xml => assert.equal(typeof node, 'object'); assert.equal((node.constructor as any).name, 'Element'); assert.equal(value, 'hello'); - return 'y'; + return 'y'; })); assert.equal(result, 'y'); diff --git a/xmlpoke/xmlpoke.d.ts b/xmlpoke/xmlpoke.d.ts index 4b8868be98..5e0b33948f 100644 --- a/xmlpoke/xmlpoke.d.ts +++ b/xmlpoke/xmlpoke.d.ts @@ -3,7 +3,7 @@ // Definitions by: Garth Kidd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// +/// declare module XmlPoke { // ghost module interface Transform {