From 46356052281b869c51e3e2d94a194262ab84322e Mon Sep 17 00:00:00 2001 From: Silas Rech Date: Mon, 30 Jul 2018 14:34:34 +0200 Subject: [PATCH 01/49] mapbox.Marker is evented and has the draggable option --- types/mapbox-gl/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 5f64b7470b..f52ac4ed98 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -752,7 +752,7 @@ declare namespace mapboxgl { /** * Marker */ - export class Marker { + export class Marker extends Evented { constructor(options?: mapboxgl.MarkerOptions); constructor(element?: HTMLElement, options?: mapboxgl.MarkerOptions); @@ -784,6 +784,8 @@ declare namespace mapboxgl { anchor?: Anchor; color?: string + + draggable?: boolean; } /** From 2fc559fe3c6b6f6895a599d715414704bd55650a Mon Sep 17 00:00:00 2001 From: Adam Lavin Date: Sat, 4 Aug 2018 00:25:25 +0100 Subject: [PATCH 02/49] styled-system: Fix internal reference to types --- types/styled-system/dist/styles.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/styled-system/dist/styles.d.ts b/types/styled-system/dist/styles.d.ts index aec4ed4ef9..57f470e96a 100644 --- a/types/styled-system/dist/styles.d.ts +++ b/types/styled-system/dist/styles.d.ts @@ -1,4 +1,4 @@ -import { ResponsiveValue } from './space'; +import { ResponsiveValue, ResponsiveSpaceValue, SpaceValue } from './space'; export * from './space'; From 95ca74c7a24deec0aa701588cdc0fa5b61f848f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Fri, 3 Aug 2018 16:57:02 -0400 Subject: [PATCH 03/49] [react-relay] Type-check fragment references. Related to https://github.com/relay-tools/relay-compiler-language-typescript/issues/7 --- types/react-relay/index.d.ts | 34 +++++++++++--------- types/react-relay/test/react-relay-tests.tsx | 33 +++++++------------ 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/types/react-relay/index.d.ts b/types/react-relay/index.d.ts index f87ce26356..24993b0018 100644 --- a/types/react-relay/index.d.ts +++ b/types/react-relay/index.d.ts @@ -5,8 +5,9 @@ // Eloy Durán // Nicolas Pirotte // Cameron Knight +// Kaare Hoff Skovgaard // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export { commitLocalUpdate, @@ -23,17 +24,17 @@ import * as RelayRuntimeTypes from "relay-runtime"; // Utility types // ~~~~~~~~~~~~~~~~~~~~~ -// Taken from https://github.com/pelotom/type-zoo -// tslint:disable-next-line:strict-export-declare-modifiers -type Omit = Pick; +export type FragmentOrRegularProp = T extends { ' $refType': infer U } ? { ' $fragmentRefs': U } : T; -export type RemoveRelayProp

= Omit

; +export type MappedFragmentProps = { [K in keyof T]: FragmentOrRegularProp }; + +export type RemoveRelayProp

= Pick>; export interface ComponentRef { componentRef?: (ref: any) => void; } -export type RelayContainer = React.ComponentType & ComponentRef>; +export type RelayContainer

= React.ComponentType> & ComponentRef>; // ~~~~~~~~~~~~~~~~~~~~~ // Maybe Fix @@ -96,10 +97,11 @@ export class QueryRenderer extends ReactRelayQueryRenderer {} // ~~~~~~~~~~~~~~~~~~~~~ // createFragmentContainer // ~~~~~~~~~~~~~~~~~~~~~ -export function createFragmentContainer( - Component: React.ComponentType, + +export function createFragmentContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap -): RelayContainer; +): RelayContainer

; // ~~~~~~~~~~~~~~~~~~~~~ // createPaginationContainer @@ -143,11 +145,11 @@ export interface ConnectionConfig { ): RelayRuntimeTypes.Variables; query: RelayRuntimeTypes.GraphQLTaggedNode; } -export function createPaginationContainer( - Component: React.ComponentType, +export function createPaginationContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, - connectionConfig: ConnectionConfig -): RelayContainer; + connectionConfig: ConnectionConfig

+): RelayContainer

; // ~~~~~~~~~~~~~~~~~~~~~ // createRefetchContainer @@ -166,8 +168,8 @@ export type RelayRefetchProp = RelayProp & { options?: RefetchOptions ): RelayRuntimeTypes.Disposable; }; -export function createRefetchContainer( - Component: React.ComponentType, +export function createRefetchContainer

( + Component: React.ComponentType

, fragmentSpec: RelayRuntimeTypes.GraphQLTaggedNode | GeneratedNodeMap, taggedNode: RelayRuntimeTypes.GraphQLTaggedNode -): RelayContainer; +): RelayContainer

; diff --git a/types/react-relay/test/react-relay-tests.tsx b/types/react-relay/test/react-relay-tests.tsx index bf3e2d1475..300154678c 100644 --- a/types/react-relay/test/react-relay-tests.tsx +++ b/types/react-relay/test/react-relay-tests.tsx @@ -76,9 +76,8 @@ const MyEmptyQueryRenderer = () => ( type StoryLike = (storyID: string) => void; // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _Story_story$ref {} -type Story_story$ref = _Story_story$ref & FragmentReference; +declare const _Story_story$ref: unique symbol; +type Story_story$ref = typeof _Story_story$ref; // tslint:disable-next-line:interface-over-type-literal type Story_story = { readonly id: string; @@ -150,8 +149,7 @@ const Story = (() => { function doesNotRequireRelayPropToBeProvided() { const onLike = (id: string) => console.log(`Liked story #${id}`); const story: { " $fragmentRefs": Story_story$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } return StoryRefetchContainer; @@ -162,15 +160,14 @@ const Story = (() => { // ~~~~~~~~~~~~~~~~~~~~~ // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _FeedStories_feed$ref {} -type FeedStories_feed$ref = _FeedStories_feed$ref & FragmentReference; +declare const _FeedStories_feed$ref: unique symbol; +type FeedStories_feed$ref = typeof _FeedStories_feed$ref; // tslint:disable-next-line:interface-over-type-literal type FeedStories_feed = { readonly edges: ReadonlyArray<{ readonly node: { readonly id: string; - readonly " $fragmentRefs": Story_story$ref; + readonly " $fragmentRefs": Story_story$ref & FeedStories_feed$ref; }; }>; readonly " $refType": FeedStories_feed$ref; @@ -189,8 +186,7 @@ const Feed = (() => { // If you have a good relavant example, please update! relay.environment; const stories = feed.edges.map(edge => { - // TODO: Fix requirement to cast fragment reference as `any`. - return ; + return ; }); return

{stories}
; }; @@ -214,8 +210,7 @@ const Feed = (() => { function doesNotRequireRelayPropToBeProvided() { const onStoryLike = (id: string) => console.log(`Liked story #${id}`); const feed: { " $fragmentRefs": FeedStories_feed$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } return FeedFragmentContainer; @@ -226,9 +221,8 @@ const Feed = (() => { // ~~~~~~~~~~~~~~~~~~~~~ // Artifact produced by relay-compiler-language-typescript -// tslint:disable-next-line:no-const-enum -const enum _UserFeed_user$ref {} -type UserFeed_user$ref = _UserFeed_user$ref & FragmentReference; +declare const _UserFeed_user$ref: unique symbol; +type UserFeed_user$ref = typeof _UserFeed_user$ref; // tslint:disable-next-line:interface-over-type-literal type UserFeed_user = { readonly feed: { @@ -252,11 +246,9 @@ type UserFeed_user = { class UserFeed extends React.Component { render() { const onStoryLike = (id: string) => console.log(`Liked story #${id}`); - // TODO: Fix requirement to cast fragment reference as `any`. - const feed = this.props.user.feed as any; return (
- +
); @@ -329,8 +321,7 @@ type UserFeed_user = { function doesNotRequireRelayPropToBeProvided() { const user: { " $fragmentRefs": UserFeed_user$ref } = {} as any; - // TODO: Fix requirement to cast fragment reference as `any`. - ; + ; } }; From 9c32df15f4fa09780528d0d28642337937d95052 Mon Sep 17 00:00:00 2001 From: Takuya Fujiwara Date: Sat, 4 Aug 2018 13:20:54 +0900 Subject: [PATCH 04/49] add @types/svg-path-parser (#27869) --- types/svg-path-parser/index.d.ts | 102 ++++++++++++++++++ .../svg-path-parser/svg-path-parser-tests.ts | 79 ++++++++++++++ types/svg-path-parser/tsconfig.json | 23 ++++ types/svg-path-parser/tslint.json | 1 + 4 files changed, 205 insertions(+) create mode 100644 types/svg-path-parser/index.d.ts create mode 100644 types/svg-path-parser/svg-path-parser-tests.ts create mode 100644 types/svg-path-parser/tsconfig.json create mode 100644 types/svg-path-parser/tslint.json diff --git a/types/svg-path-parser/index.d.ts b/types/svg-path-parser/index.d.ts new file mode 100644 index 0000000000..d90ad4f66f --- /dev/null +++ b/types/svg-path-parser/index.d.ts @@ -0,0 +1,102 @@ +// Type definitions for svg-path-parser 1.1 +// Project: https://github.com/hughsk/svg-path-parser#readme +// Definitions by: tyru +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export function parseSVG(input: string): Command[]; +export function makeAbsolute(commands: Command[]): Command[]; + +export interface Command { + code: 'm' | 'M' | 'l' | 'L' | 'h' | 'H' | 'v' | 'V' | 'c' | 'C' | 's' | 'S' | 'q' | 'Q' | 't' | 'T' | 'a' | 'A' | 'z' | 'Z'; + command: 'moveto' | 'lineto' | 'horizontal lineto' | 'vertical lineto' | 'curveto' | 'smooth curveto' | 'quadratic curveto' | 'smooth quadratic curveto' | 'elliptical arc' | 'closepath'; + relative?: boolean; +} + +export interface MoveToCommand { + code: 'm' | 'M'; + command: 'moveto'; + relative?: boolean; + x: number; + y: number; +} + +export interface LineToCommand { + code: 'l' | 'L'; + command: 'lineto'; + relative?: boolean; + x: number; + y: number; +} + +export interface HorizontalLineToCommand { + code: 'h' | 'H'; + command: 'horizontal lineto'; + relative?: boolean; + x: number; +} + +export interface VerticalLineToCommand { + code: 'v' | 'V'; + command: 'vertical lineto'; + relative?: boolean; + y: number; +} + +export interface ClosePathCommand { + code: 'z' | 'Z'; + command: 'closepath'; + relative?: boolean; +} + +export interface CurveToCommand { + code: 'c' | 'C'; + command: 'curveto'; + relative?: boolean; + x1: number; + y1: number; + x2: number; + y2: number; + x: number; + y: number; +} + +export interface SmoothCurveToCommand { + code: 's' | 'S'; + command: 'smooth curveto'; + relative?: boolean; + x2: number; + y2: number; + x: number; + y: number; +} + +export interface QuadraticCurveToCommand { + code: 'q' | 'Q'; + command: 'quadratic curveto'; + relative?: boolean; + x1: number; + y1: number; + x: number; + y: number; +} + +export interface SmoothQuadraticCurveToCommand { + code: 't' | 'T'; + command: 'smooth quadratic curveto'; + relative?: boolean; + x: number; + y: number; +} + +export interface EllipticalArcCommand { + code: 'a' | 'A'; + command: 'elliptical arc'; + relative?: boolean; + rx: number; + ry: number; + xAxisRotation: number; + largeArc: boolean; + sweep: boolean; + x: number; + y: number; +} diff --git a/types/svg-path-parser/svg-path-parser-tests.ts b/types/svg-path-parser/svg-path-parser-tests.ts new file mode 100644 index 0000000000..4966054a79 --- /dev/null +++ b/types/svg-path-parser/svg-path-parser-tests.ts @@ -0,0 +1,79 @@ +/// + +import * as svgParser from 'svg-path-parser'; + +function isMoveToCommand(cmd: svgParser.Command): cmd is svgParser.MoveToCommand { + return cmd.command === 'moveto'; +} + +function isLineToCommand(cmd: svgParser.Command): cmd is svgParser.LineToCommand { + return cmd.command === 'lineto'; +} + +function isHorizontalLineToCommand(cmd: svgParser.Command): cmd is svgParser.HorizontalLineToCommand { + return cmd.command === 'horizontal lineto'; +} + +function isVerticalLineToCommand(cmd: svgParser.Command): cmd is svgParser.VerticalLineToCommand { + return cmd.command === 'vertical lineto'; +} + +function isClosePathCommand(cmd: svgParser.Command): cmd is svgParser.ClosePathCommand { + return cmd.command === 'closepath'; +} + +function isCurveToCommand(cmd: svgParser.Command): cmd is svgParser.CurveToCommand { + return cmd.command === 'curveto'; +} + +function isSmoothCurveToCommand(cmd: svgParser.Command): cmd is svgParser.SmoothCurveToCommand { + return cmd.command === 'smooth curveto'; +} + +function isQuadraticCurveToCommand(cmd: svgParser.Command): cmd is svgParser.QuadraticCurveToCommand { + return cmd.command === 'quadratic curveto'; +} + +function isSmoothQuadraticCurveToCommand(cmd: svgParser.Command): cmd is svgParser.SmoothQuadraticCurveToCommand { + return cmd.command === 'smooth quadratic curveto'; +} + +function isEllipticalArcCommand(cmd: svgParser.Command): cmd is svgParser.EllipticalArcCommand { + return cmd.command === 'elliptical arc'; +} + +function stringify(cmd: svgParser.Command) { + if (isMoveToCommand(cmd)) { + return `${cmd.code} ${cmd.x} ${cmd.y}`; + } else if (isLineToCommand(cmd)) { + return `${cmd.code} ${cmd.x} ${cmd.y}`; + } else if (isLineToCommand(cmd)) { + return `${cmd.code} ${cmd.x} ${cmd.y}`; + } else if (isHorizontalLineToCommand(cmd)) { + return `${cmd.code} ${cmd.x}`; + } else if (isVerticalLineToCommand(cmd)) { + return `${cmd.code} ${cmd.y}`; + } else if (isClosePathCommand(cmd)) { + return `${cmd.code}`; + } else if (isCurveToCommand(cmd)) { + return `${cmd.code} ${cmd.x1} ${cmd.y1} ${cmd.x2} ${cmd.y2} ${cmd.x} ${cmd.y}`; + } else if (isSmoothCurveToCommand(cmd)) { + return `${cmd.code} ${cmd.x2} ${cmd.y2} ${cmd.x} ${cmd.y}`; + } else if (isQuadraticCurveToCommand(cmd)) { + return `${cmd.code} ${cmd.x1} ${cmd.y1} ${cmd.x} ${cmd.y}`; + } else if (isSmoothQuadraticCurveToCommand(cmd)) { + return `${cmd.code} ${cmd.x} ${cmd.y}`; + } else if (isEllipticalArcCommand(cmd)) { + return `${cmd.code} ${cmd.rx} ${cmd.ry} ${cmd.xAxisRotation} ${cmd.largeArc} ${cmd.sweep} ${cmd.x} ${cmd.y}`; + } else { + throw new Error(`${cmd.code} command is unknown command: cmd = ${JSON.stringify(cmd)}`); + } +} + +let cmds = svgParser.parseSVG('M 0 0 L 50 50'); +// makeAbsolute() changes cmds inplacely +cmds = svgParser.makeAbsolute(cmds); + +cmds.filter((cmd: svgParser.Command) => !cmd.relative) // relative commands must not exist + .map(stringify) + .forEach(console.log); diff --git a/types/svg-path-parser/tsconfig.json b/types/svg-path-parser/tsconfig.json new file mode 100644 index 0000000000..024c3cc91f --- /dev/null +++ b/types/svg-path-parser/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "svg-path-parser-tests.ts" + ] +} diff --git a/types/svg-path-parser/tslint.json b/types/svg-path-parser/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/svg-path-parser/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From bc0c933415466b34d2de5790f7cd6418f676801e Mon Sep 17 00:00:00 2001 From: Ferdy Budhidharma Date: Mon, 6 Aug 2018 00:28:42 -0500 Subject: [PATCH 05/49] feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744) * feat(react-dependents): update to ts 2.8 * fix version mismatches * remove package.json * post merge updates * add package.json back again --- types/react-mailchimp-subscribe/index.d.ts | 2 +- types/react-map-gl/index.d.ts | 2 +- types/react-maskedinput/index.d.ts | 2 +- types/react-mce/index.d.ts | 2 +- types/react-mdl/index.d.ts | 2 +- types/react-measure/index.d.ts | 2 +- types/react-mixin/index.d.ts | 2 +- types/react-modal/index.d.ts | 2 +- types/react-motion-slider/index.d.ts | 2 +- types/react-motion-ui-pack/index.d.ts | 2 +- types/react-motion/index.d.ts | 2 +- types/react-native-android-taskdescription/index.d.ts | 2 +- types/react-native-autocomplete-input/index.d.ts | 2 +- types/react-native-bluetooth-serial/index.d.ts | 2 +- types/react-native-calendars/index.d.ts | 2 +- types/react-native-datepicker/index.d.ts | 2 +- types/react-native-dialog/index.d.ts | 2 +- types/react-native-dialogflow/index.d.ts | 2 +- types/react-native-doc-viewer/index.d.ts | 2 +- types/react-native-drawer-layout/index.d.ts | 2 +- types/react-native-drawer/index.d.ts | 2 +- types/react-native-elevated-view/index.d.ts | 2 +- types/react-native-fbsdk/index.d.ts | 2 +- types/react-native-fs/index.d.ts | 2 +- types/react-native-google-signin/index.d.ts | 2 +- types/react-native-htmlview/index.d.ts | 2 +- types/react-native-indicators/index.d.ts | 2 +- types/react-native-keep-awake/index.d.ts | 2 +- types/react-native-keyboard-spacer/index.d.ts | 2 +- types/react-native-loading-spinner-overlay/index.d.ts | 2 +- types/react-native-material-design-searchbar/index.d.ts | 2 +- types/react-native-material-kit/index.d.ts | 2 +- types/react-native-material-textfield/index.d.ts | 2 +- types/react-native-material-ui/index.d.ts | 2 +- types/react-native-modalbox/index.d.ts | 2 +- types/react-native-multi-slider/index.d.ts | 2 +- types/react-native-navbar/index.d.ts | 2 +- types/react-native-photo-view/index.d.ts | 2 +- types/react-native-popup-dialog/index.d.ts | 2 +- types/react-native-qrcode/index.d.ts | 2 +- types/react-native-safari-view/index.d.ts | 2 +- types/react-native-scrollable-tab-view/index.d.ts | 2 +- types/react-native-sensor-manager/index.d.ts | 2 +- types/react-native-settings-list/index.d.ts | 2 +- types/react-native-snap-carousel/index.d.ts | 2 +- types/react-native-sortable-grid/index.d.ts | 2 +- types/react-native-sortable-list/index.d.ts | 2 +- types/react-native-star-rating/index.d.ts | 2 +- types/react-native-svg-uri/index.d.ts | 2 +- types/react-native-swiper/index.d.ts | 2 +- types/react-native-tab-navigator/index.d.ts | 2 +- types/react-native-tab-view/index.d.ts | 2 +- types/react-native-text-input-mask/index.d.ts | 2 +- types/react-native-toast-native/index.d.ts | 2 +- types/react-native-vector-icons/index.d.ts | 2 +- types/react-native-video/index.d.ts | 2 +- types/react-native/index.d.ts | 2 +- types/react-navigation/index.d.ts | 2 +- types/react-navigation/v1/index.d.ts | 2 +- types/react-notification-system-redux/index.d.ts | 2 +- types/react-notification-system/index.d.ts | 2 +- types/react-notify-toast/index.d.ts | 2 +- types/react-numeric-input/index.d.ts | 2 +- types/react-onclickoutside/index.d.ts | 2 +- types/react-onclickoutside/v5/index.d.ts | 2 +- types/react-onsenui/index.d.ts | 2 +- types/react-overlays/index.d.ts | 2 +- types/react-owl-carousel/index.d.ts | 2 +- types/react-paginate/index.d.ts | 2 +- types/react-places-autocomplete/index.d.ts | 2 +- types/react-pointable/index.d.ts | 2 +- types/react-popover/index.d.ts | 2 +- types/react-portal/index.d.ts | 2 +- types/react-primitives/index.d.ts | 2 +- types/react-radio-group/index.d.ts | 2 +- types/react-recaptcha/index.d.ts | 2 +- types/react-redux-epic/index.d.ts | 2 +- types/react-redux-i18n/index.d.ts | 2 +- types/react-redux/v5/index.d.ts | 2 +- types/react-resize-detector/index.d.ts | 2 +- types/react-resolver/index.d.ts | 2 +- types/react-responsive/index.d.ts | 2 +- types/react-responsive/v1/index.d.ts | 2 +- types/react-rnd/index.d.ts | 2 +- types/react-router/v2/index.d.ts | 2 +- types/react-router/v3/index.d.ts | 2 +- types/react-s-alert/index.d.ts | 2 +- types/react-scroll/index.d.ts | 2 +- types/react-scrollbar/index.d.ts | 2 +- types/react-share/index.d.ts | 2 +- types/react-show-more/index.d.ts | 2 +- types/react-side-effect/index.d.ts | 2 +- types/react-sidebar/index.d.ts | 2 +- types/react-sketchapp/index.d.ts | 2 +- types/react-slick/index.d.ts | 2 +- types/react-slider/index.d.ts | 2 +- types/react-smooth-scrollbar/index.d.ts | 2 +- types/react-sortable-hoc/index.d.ts | 2 +- types/react-sortable-pane/index.d.ts | 2 +- types/react-spinkit/index.d.ts | 2 +- types/react-spinkit/v1/index.d.ts | 2 +- types/react-sticky-el/index.d.ts | 2 +- types/react-sticky/index.d.ts | 2 +- types/react-stripe-elements/index.d.ts | 2 +- types/react-svg-inline/index.d.ts | 2 +- types/react-svg-pan-zoom/index.d.ts | 2 +- types/react-swf/index.d.ts | 2 +- types/react-swipe/index.d.ts | 2 +- types/react-swipeable-views/index.d.ts | 2 +- types/react-swipeable/index.d.ts | 2 +- types/react-syntax-highlighter/index.d.ts | 2 +- types/react-table/index.d.ts | 2 +- types/react-tabs/index.d.ts | 2 +- types/react-tag-input/index.d.ts | 2 +- types/react-tagcloud/index.d.ts | 2 +- types/react-tagsinput/index.d.ts | 2 +- types/react-test-renderer/index.d.ts | 2 +- types/react-test-renderer/v15/index.d.ts | 2 +- types/react-tether/index.d.ts | 2 +- types/react-text-mask/index.d.ts | 2 +- types/react-textarea-autosize/index.d.ts | 2 +- types/react-timeout/index.d.ts | 2 +- types/react-toastify/index.d.ts | 2 +- types/react-toastr/index.d.ts | 2 +- types/react-toggle/index.d.ts | 2 +- types/react-toggle/v2/index.d.ts | 2 +- types/react-tooltip/index.d.ts | 2 +- types/react-touch/index.d.ts | 2 +- types/react-tracking/index.d.ts | 2 +- types/react-transition-group/index.d.ts | 2 +- types/react-transition-group/v1/index.d.ts | 2 +- types/react-treeview/index.d.ts | 2 +- types/react-truncate/index.d.ts | 2 +- types/react-twitter-auth/index.d.ts | 2 +- types/react-user-tour/index.d.ts | 2 +- types/react-virtual-keyboard/index.d.ts | 2 +- types/react-webcam/index.d.ts | 2 +- types/react-widgets/index.d.ts | 2 +- types/react-youtube-embed/index.d.ts | 2 +- types/react-youtube/index.d.ts | 2 +- types/reactable/index.d.ts | 2 +- types/reactcss/index.d.ts | 2 +- types/reactstrap/v4/index.d.ts | 2 +- types/reapop/index.d.ts | 2 +- types/rebass/index.d.ts | 2 +- types/recharts/index.d.ts | 2 +- types/recompose/index.d.ts | 2 +- types/recompose/recompose-tests.tsx | 2 +- types/redux-auth-wrapper/v1/index.d.ts | 2 +- types/redux-auth-wrapper/v1/package.json | 6 ++++++ types/redux-devtools-dock-monitor/index.d.ts | 2 +- types/redux-devtools-log-monitor/index.d.ts | 2 +- types/redux-first-router-link/index.d.ts | 2 +- types/redux-infinite-scroll/index.d.ts | 2 +- types/redux-router/index.d.ts | 2 +- types/redux-ui/index.d.ts | 2 +- types/rheostat/index.d.ts | 2 +- types/slate-html-serializer/index.d.ts | 2 +- types/slate-react/index.d.ts | 2 +- types/spectacle/index.d.ts | 2 +- types/storybook-addon-jsx/index.d.ts | 2 +- types/storybook__addon-a11y/index.d.ts | 2 +- types/storybook__addon-actions/index.d.ts | 2 +- types/storybook__addon-backgrounds/index.d.ts | 2 +- types/storybook__addon-centered/index.d.ts | 2 +- types/storybook__addon-info/index.d.ts | 2 +- types/storybook__addon-jest/index.d.ts | 2 +- types/storybook__addon-knobs/index.d.ts | 2 +- types/storybook__addon-links/index.d.ts | 2 +- types/storybook__addon-notes/index.d.ts | 2 +- types/storybook__react-native/index.d.ts | 2 +- types/storybook__react/index.d.ts | 2 +- types/styled-jsx/index.d.ts | 2 +- types/styled-system/index.d.ts | 2 +- types/tiny-slider-react/index.d.ts | 2 +- types/victory/index.d.ts | 2 +- types/why-did-you-update/index.d.ts | 2 +- 177 files changed, 182 insertions(+), 176 deletions(-) create mode 100644 types/redux-auth-wrapper/v1/package.json diff --git a/types/react-mailchimp-subscribe/index.d.ts b/types/react-mailchimp-subscribe/index.d.ts index 558c6a92cd..55b5c487ed 100644 --- a/types/react-mailchimp-subscribe/index.d.ts +++ b/types/react-mailchimp-subscribe/index.d.ts @@ -2,7 +2,7 @@ // Project: https://revolunet.github.io/react-mailchimp-subscribe/ // Definitions by: Omar Diab // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from "react"; diff --git a/types/react-map-gl/index.d.ts b/types/react-map-gl/index.d.ts index 6209e66e81..2260644d32 100644 --- a/types/react-map-gl/index.d.ts +++ b/types/react-map-gl/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Robert Imig // Fabio Berta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as MapboxGL from 'mapbox-gl'; diff --git a/types/react-maskedinput/index.d.ts b/types/react-maskedinput/index.d.ts index 3a1b4687eb..dc38064cab 100644 --- a/types/react-maskedinput/index.d.ts +++ b/types/react-maskedinput/index.d.ts @@ -4,7 +4,7 @@ // Adam Lavin // Carlos Bonetti // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-mce/index.d.ts b/types/react-mce/index.d.ts index 6f1fb978db..1db5f00286 100644 --- a/types/react-mce/index.d.ts +++ b/types/react-mce/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/janstuemmel/react-mce // Definitions by: Gavin Heise // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ActualTinyMCE from 'tinymce'; diff --git a/types/react-mdl/index.d.ts b/types/react-mdl/index.d.ts index caf910d421..1b83bf7def 100644 --- a/types/react-mdl/index.d.ts +++ b/types/react-mdl/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tleunen/react-mdl // Definitions by: Brad Zacher // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-measure/index.d.ts b/types/react-measure/index.d.ts index 241d482a53..9cd5853948 100644 --- a/types/react-measure/index.d.ts +++ b/types/react-measure/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-measure // Definitions by: Alexey Svetliakov , Marc Fallows // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-mixin/index.d.ts b/types/react-mixin/index.d.ts index 265794afe2..284d278ff8 100644 --- a/types/react-mixin/index.d.ts +++ b/types/react-mixin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/brigand/react-mixin // Definitions by: Qubo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-modal/index.d.ts b/types/react-modal/index.d.ts index 9dfbf7bdf7..237c725332 100644 --- a/types/react-modal/index.d.ts +++ b/types/react-modal/index.d.ts @@ -7,7 +7,7 @@ // Uwe Wiemer , // Peter Blazejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-motion-slider/index.d.ts b/types/react-motion-slider/index.d.ts index 2e7ea921ef..a53ec42259 100644 --- a/types/react-motion-slider/index.d.ts +++ b/types/react-motion-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-motion-slider // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module "react-motion-slider" { import * as React from "react"; diff --git a/types/react-motion-ui-pack/index.d.ts b/types/react-motion-ui-pack/index.d.ts index 0e0e518f70..477cf0e604 100644 --- a/types/react-motion-ui-pack/index.d.ts +++ b/types/react-motion-ui-pack/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-motion-ui-pack // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as motion from 'react-motion'; diff --git a/types/react-motion/index.d.ts b/types/react-motion/index.d.ts index f4f94095a8..761c8e559f 100644 --- a/types/react-motion/index.d.ts +++ b/types/react-motion/index.d.ts @@ -4,7 +4,7 @@ // Alexey Svetliakov // Dimitar Nestorov // Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactElement } from 'react'; diff --git a/types/react-native-android-taskdescription/index.d.ts b/types/react-native-android-taskdescription/index.d.ts index 0f395e91f2..172f47fe00 100644 --- a/types/react-native-android-taskdescription/index.d.ts +++ b/types/react-native-android-taskdescription/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jwarby/react-native-android-taskdescription // Definitions by: Christian Chown // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-native-autocomplete-input/index.d.ts b/types/react-native-autocomplete-input/index.d.ts index f6c5f06eb6..9e39a47241 100644 --- a/types/react-native-autocomplete-input/index.d.ts +++ b/types/react-native-autocomplete-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/l-urence/react-native-autocomplete-input#readme // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from 'react'; import { diff --git a/types/react-native-bluetooth-serial/index.d.ts b/types/react-native-bluetooth-serial/index.d.ts index 8dc4d9c1a1..7dc49dcf83 100644 --- a/types/react-native-bluetooth-serial/index.d.ts +++ b/types/react-native-bluetooth-serial/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/rusel1989/react-native-bluetooth-serial // Definitions by: Rodrigo Weber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-calendars/index.d.ts b/types/react-native-calendars/index.d.ts index 6294af4682..3784c1f628 100644 --- a/types/react-native-calendars/index.d.ts +++ b/types/react-native-calendars/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wix/react-native-calendars#readme // Definitions by: Tyler Zhang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps, StyleProp } from 'react-native'; diff --git a/types/react-native-datepicker/index.d.ts b/types/react-native-datepicker/index.d.ts index dfc8bd5b13..929acdc375 100644 --- a/types/react-native-datepicker/index.d.ts +++ b/types/react-native-datepicker/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xgfe/react-native-datepicker // Definitions by: Jacob Baskin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource } from 'react-native'; diff --git a/types/react-native-dialog/index.d.ts b/types/react-native-dialog/index.d.ts index 3a1cf94be9..10e977f420 100644 --- a/types/react-native-dialog/index.d.ts +++ b/types/react-native-dialog/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mmazzarolo/react-native-dialog // Definitions by: MrLuje // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Ref, PureComponent, ReactNode } from "react"; import { diff --git a/types/react-native-dialogflow/index.d.ts b/types/react-native-dialogflow/index.d.ts index c1b663ddb5..59ebff7cdf 100644 --- a/types/react-native-dialogflow/index.d.ts +++ b/types/react-native-dialogflow/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/innFactory/react-native-dialogflow#readme // Definitions by: Jason Merino // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export namespace Dialogflow { const LANG_CHINESE_CHINA = 'zh-CN'; diff --git a/types/react-native-doc-viewer/index.d.ts b/types/react-native-doc-viewer/index.d.ts index 6d09e3966a..f7e28147b7 100644 --- a/types/react-native-doc-viewer/index.d.ts +++ b/types/react-native-doc-viewer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/philipphecht/react-native-doc-viewer/blob/master/README.md // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export function openDoc( files: Array<{ url: string; fileName?: string }>, diff --git a/types/react-native-drawer-layout/index.d.ts b/types/react-native-drawer-layout/index.d.ts index af3a05698e..3bf4ace1db 100644 --- a/types/react-native-drawer-layout/index.d.ts +++ b/types/react-native-drawer-layout/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-drawer-layout // Definitions by: Justin Firth // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps } from 'react-native'; diff --git a/types/react-native-drawer/index.d.ts b/types/react-native-drawer/index.d.ts index 3a82e3363a..da3420b9a7 100644 --- a/types/react-native-drawer/index.d.ts +++ b/types/react-native-drawer/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: jnbt // suniahk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, ScaledSize } from 'react-native'; diff --git a/types/react-native-elevated-view/index.d.ts b/types/react-native-elevated-view/index.d.ts index e9ac2b1103..7c538a4742 100644 --- a/types/react-native-elevated-view/index.d.ts +++ b/types/react-native-elevated-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/alekhurst/react-native-elevated-view // Definitions by: fhelwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactNative from 'react-native'; diff --git a/types/react-native-fbsdk/index.d.ts b/types/react-native-fbsdk/index.d.ts index 8b948d6b0d..eacc05209e 100644 --- a/types/react-native-fbsdk/index.d.ts +++ b/types/react-native-fbsdk/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/facebook/react-native-fbsdk // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, Component } from 'react'; import { ViewStyle } from 'react-native'; diff --git a/types/react-native-fs/index.d.ts b/types/react-native-fs/index.d.ts index 17f26a5514..6c92933c44 100644 --- a/types/react-native-fs/index.d.ts +++ b/types/react-native-fs/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Paulo Cesar // Joseph Roque // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-native-google-signin/index.d.ts b/types/react-native-google-signin/index.d.ts index 862a40a35a..6cf83ed1e4 100644 --- a/types/react-native-google-signin/index.d.ts +++ b/types/react-native-google-signin/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/devfd/react-native-google-signin // Definitions by: Jacob Froman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewProps } from 'react-native'; diff --git a/types/react-native-htmlview/index.d.ts b/types/react-native-htmlview/index.d.ts index b0eb2ae6a3..0f2b9d661d 100644 --- a/types/react-native-htmlview/index.d.ts +++ b/types/react-native-htmlview/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jsdf/react-native-htmlview // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ComponentType, ReactNode } from 'react'; import { diff --git a/types/react-native-indicators/index.d.ts b/types/react-native-indicators/index.d.ts index ee4a13a4c2..1a732d8cee 100644 --- a/types/react-native-indicators/index.d.ts +++ b/types/react-native-indicators/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/n4kz/react-native-indicators#readme // Definitions by: Ifiok Jr. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; import { Animated, EasingFunction } from 'react-native'; diff --git a/types/react-native-keep-awake/index.d.ts b/types/react-native-keep-awake/index.d.ts index f22d1342c6..c717e83ba3 100644 --- a/types/react-native-keep-awake/index.d.ts +++ b/types/react-native-keep-awake/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/corbt/react-native-keep-awake // Definitions by: huhuanming // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; declare class KeepAwake extends React.Component<{ children?: JSX.Element }> { diff --git a/types/react-native-keyboard-spacer/index.d.ts b/types/react-native-keyboard-spacer/index.d.ts index 0c7ec24262..49ad68de41 100644 --- a/types/react-native-keyboard-spacer/index.d.ts +++ b/types/react-native-keyboard-spacer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Andr3wHur5t/react-native-keyboard-spacer#readme // Definitions by: Vincent Langlet // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactNative from 'react-native'; diff --git a/types/react-native-loading-spinner-overlay/index.d.ts b/types/react-native-loading-spinner-overlay/index.d.ts index 93d511d863..aa494b5fd4 100644 --- a/types/react-native-loading-spinner-overlay/index.d.ts +++ b/types/react-native-loading-spinner-overlay/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/joinspontaneous/react-native-loading-spinner-overlay // Definitions by: fhelwanger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-material-design-searchbar/index.d.ts b/types/react-native-material-design-searchbar/index.d.ts index 23b3204c76..ed9534a38c 100644 --- a/types/react-native-material-design-searchbar/index.d.ts +++ b/types/react-native-material-design-searchbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ananddayalan/react-native-material-design-searchbar // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-kit/index.d.ts b/types/react-native-material-kit/index.d.ts index f820d8e4cd..48c044a629 100644 --- a/types/react-native-material-kit/index.d.ts +++ b/types/react-native-material-kit/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-textfield/index.d.ts b/types/react-native-material-textfield/index.d.ts index 5f3ffc437f..c21caa15b4 100644 --- a/types/react-native-material-textfield/index.d.ts +++ b/types/react-native-material-textfield/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ville Venäläinen // Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-material-ui/index.d.ts b/types/react-native-material-ui/index.d.ts index 3c4c549504..8bb86d3cc3 100644 --- a/types/react-native-material-ui/index.d.ts +++ b/types/react-native-material-ui/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/xotahal/react-native-material-ui // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; import { ViewStyle, TextStyle, Image } from 'react-native'; diff --git a/types/react-native-modalbox/index.d.ts b/types/react-native-modalbox/index.d.ts index 84461471f2..778f953f78 100644 --- a/types/react-native-modalbox/index.d.ts +++ b/types/react-native-modalbox/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/maxs15/react-native-modalbox#readme // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; diff --git a/types/react-native-multi-slider/index.d.ts b/types/react-native-multi-slider/index.d.ts index a3a5f39c63..42d4856938 100644 --- a/types/react-native-multi-slider/index.d.ts +++ b/types/react-native-multi-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JackDanielsAndCode/react-native-multi-slider#readme // Definitions by: Edward Sammut Alessi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { ViewStyle } from "react-native"; diff --git a/types/react-native-navbar/index.d.ts b/types/react-native-navbar/index.d.ts index 5c21ea38e8..afcd7df3ed 100644 --- a/types/react-native-navbar/index.d.ts +++ b/types/react-native-navbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-navbar // Definitions by: Ryo Kikuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, TextProps } from 'react-native'; diff --git a/types/react-native-photo-view/index.d.ts b/types/react-native-photo-view/index.d.ts index c3f27d78a6..c104b1c0e5 100644 --- a/types/react-native-photo-view/index.d.ts +++ b/types/react-native-photo-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/alwx/react-native-photo-view // Definitions by: Christian Chown // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageSourcePropType, ViewProps } from 'react-native'; diff --git a/types/react-native-popup-dialog/index.d.ts b/types/react-native-popup-dialog/index.d.ts index 5ddb40e0b2..3ff12802f4 100644 --- a/types/react-native-popup-dialog/index.d.ts +++ b/types/react-native-popup-dialog/index.d.ts @@ -4,7 +4,7 @@ // connectdotz // Michele Bombardi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { GestureResponderEvent, StyleProp, ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-qrcode/index.d.ts b/types/react-native-qrcode/index.d.ts index 7c745aa1b6..97709c5792 100644 --- a/types/react-native-qrcode/index.d.ts +++ b/types/react-native-qrcode/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/cssivision/react-native-qrcode // Definitions by: York Yao // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-native-safari-view/index.d.ts b/types/react-native-safari-view/index.d.ts index 658a6664ce..77b8aa15e8 100644 --- a/types/react-native-safari-view/index.d.ts +++ b/types/react-native-safari-view/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/naoufal/react-native-safari-view // Definitions by: Michael Randolph // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { EmitterSubscription } from 'react-native'; diff --git a/types/react-native-scrollable-tab-view/index.d.ts b/types/react-native-scrollable-tab-view/index.d.ts index 962ba8a810..9be23aa66c 100644 --- a/types/react-native-scrollable-tab-view/index.d.ts +++ b/types/react-native-scrollable-tab-view/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: CaiHuan // Egor Shulga // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Animated, ScrollViewProps, ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-sensor-manager/index.d.ts b/types/react-native-sensor-manager/index.d.ts index 0b0f0bf67a..9c25be10ba 100644 --- a/types/react-native-sensor-manager/index.d.ts +++ b/types/react-native-sensor-manager/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kprimice/react-native-sensor-manager // Definitions by: Sahin Vardar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-native-settings-list/index.d.ts b/types/react-native-settings-list/index.d.ts index 0ba14c9562..e04b856296 100644 --- a/types/react-native-settings-list/index.d.ts +++ b/types/react-native-settings-list/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/evetstech/react-native-settings-list // Definitions by: MrLuje // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactNode } from "react"; import { TextStyle, StyleProp, ImageStyle, ViewStyle } from "react-native"; diff --git a/types/react-native-snap-carousel/index.d.ts b/types/react-native-snap-carousel/index.d.ts index 56b083638b..3c630bc094 100644 --- a/types/react-native-snap-carousel/index.d.ts +++ b/types/react-native-snap-carousel/index.d.ts @@ -4,7 +4,7 @@ // Jacob Froman // Nikolay Polukhin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-sortable-grid/index.d.ts b/types/react-native-sortable-grid/index.d.ts index 392e9b1b01..0551d56efe 100644 --- a/types/react-native-sortable-grid/index.d.ts +++ b/types/react-native-sortable-grid/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ollija/react-native-sortable-grid#readme // Definitions by: Jacob Froman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { StyleProp, ViewStyle, Animated } from 'react-native'; diff --git a/types/react-native-sortable-list/index.d.ts b/types/react-native-sortable-list/index.d.ts index d5466c8f68..65b34ce62f 100755 --- a/types/react-native-sortable-list/index.d.ts +++ b/types/react-native-sortable-list/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gitim/react-native-sortable-list // Definitions by: Michael Sivolobov , Vince Maiuri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle } from 'react-native'; diff --git a/types/react-native-star-rating/index.d.ts b/types/react-native-star-rating/index.d.ts index 2285134c8f..a26002bf88 100644 --- a/types/react-native-star-rating/index.d.ts +++ b/types/react-native-star-rating/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/djchie/react-native-star-rating // Definitions by: iRoachie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource, StyleProp, ViewStyle } from 'react-native'; diff --git a/types/react-native-svg-uri/index.d.ts b/types/react-native-svg-uri/index.d.ts index 4529c53d5e..a47550bced 100644 --- a/types/react-native-svg-uri/index.d.ts +++ b/types/react-native-svg-uri/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/matiascba/react-native-svg-uri#readme // Definitions by: Kyle Roach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ImageURISource } from 'react-native'; diff --git a/types/react-native-swiper/index.d.ts b/types/react-native-swiper/index.d.ts index c6616aea0c..a201bcd00b 100644 --- a/types/react-native-swiper/index.d.ts +++ b/types/react-native-swiper/index.d.ts @@ -4,7 +4,7 @@ // HuHuanming // mhcgrq // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native-tab-navigator/index.d.ts b/types/react-native-tab-navigator/index.d.ts index 1f4e5e5437..1586b7279a 100644 --- a/types/react-native-tab-navigator/index.d.ts +++ b/types/react-native-tab-navigator/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/exponentjs/react-native-tab-navigator#readme // Definitions by: My Self // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { ViewStyle, TextStyle } from 'react-native'; diff --git a/types/react-native-tab-view/index.d.ts b/types/react-native-tab-view/index.d.ts index 0e5ee892ce..078247e97d 100644 --- a/types/react-native-tab-view/index.d.ts +++ b/types/react-native-tab-view/index.d.ts @@ -4,7 +4,7 @@ // Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { PureComponent, ReactNode, ComponentType } from 'react' import { Animated, diff --git a/types/react-native-text-input-mask/index.d.ts b/types/react-native-text-input-mask/index.d.ts index 33505ccc54..4cf4b392dc 100644 --- a/types/react-native-text-input-mask/index.d.ts +++ b/types/react-native-text-input-mask/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-text-input-mask // Definitions by: Rodrigo Weber // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import * as ReactNative from "react-native"; diff --git a/types/react-native-toast-native/index.d.ts b/types/react-native-toast-native/index.d.ts index 130614290b..6240441781 100644 --- a/types/react-native-toast-native/index.d.ts +++ b/types/react-native-toast-native/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/onemolegames/react-native-toast-native/blob/master/README.md // Definitions by: Michele Bombardi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Platform } from 'react-native'; diff --git a/types/react-native-vector-icons/index.d.ts b/types/react-native-vector-icons/index.d.ts index 60e6408d18..6aabaadd70 100644 --- a/types/react-native-vector-icons/index.d.ts +++ b/types/react-native-vector-icons/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Kyle Roach // Tim Wang // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Icon } from './Icon'; diff --git a/types/react-native-video/index.d.ts b/types/react-native-video/index.d.ts index d4ba6900f8..e84bcc7637 100644 --- a/types/react-native-video/index.d.ts +++ b/types/react-native-video/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-native-community/react-native-video // Definitions by: HuHuanming // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index abec02a1b3..aff434f277 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -12,7 +12,7 @@ // Tanguy Krotoff // Alexander T. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // diff --git a/types/react-navigation/index.d.ts b/types/react-navigation/index.d.ts index e5e9ea00d8..2573315c09 100644 --- a/types/react-navigation/index.d.ts +++ b/types/react-navigation/index.d.ts @@ -20,7 +20,7 @@ // Luca Campana // Ullrich Schaefer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /** * Reference: https://github.com/react-navigation/react-navigation/tree/a37473c5e4833f48796ee6c7c9cb4a8ac49d9c06 diff --git a/types/react-navigation/v1/index.d.ts b/types/react-navigation/v1/index.d.ts index 1233ca39e3..16779c4e4e 100644 --- a/types/react-navigation/v1/index.d.ts +++ b/types/react-navigation/v1/index.d.ts @@ -17,7 +17,7 @@ // Ciaran Liedeman // Edward Sammut Alessi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /** * Reference: https://github.com/react-navigation/react-navigation/tree/3f3ef6485c8932f49fddc3dd2c508629110bf2b6 diff --git a/types/react-notification-system-redux/index.d.ts b/types/react-notification-system-redux/index.d.ts index d74ea35871..701bde55cf 100644 --- a/types/react-notification-system-redux/index.d.ts +++ b/types/react-notification-system-redux/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gor181/react-notification-system-redux // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; import { Action } from "redux"; diff --git a/types/react-notification-system/index.d.ts b/types/react-notification-system/index.d.ts index a993f6cc4d..d172cd6b2c 100644 --- a/types/react-notification-system/index.d.ts +++ b/types/react-notification-system/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/react-notification-system // Definitions by: Giedrius Grabauskas , Deividas Bakanas , Karol Janyst , Bartosz Szewczyk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-notify-toast/index.d.ts b/types/react-notify-toast/index.d.ts index 689d543ce8..1feb26ef61 100644 --- a/types/react-notify-toast/index.d.ts +++ b/types/react-notify-toast/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jesusoterogomez/react-notify-toast // Definitions by: Klaas Cuvelier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-numeric-input/index.d.ts b/types/react-numeric-input/index.d.ts index b10a54cfe3..bc28d95825 100644 --- a/types/react-numeric-input/index.d.ts +++ b/types/react-numeric-input/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/vlad-ignatov/react-numeric-input#readme // Definitions by: Heather Booker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-onclickoutside/index.d.ts b/types/react-onclickoutside/index.d.ts index d97970642f..2fb5659029 100644 --- a/types/react-onclickoutside/index.d.ts +++ b/types/react-onclickoutside/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Pomax/react-onclickoutside // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-onclickoutside/v5/index.d.ts b/types/react-onclickoutside/v5/index.d.ts index 4228697e22..82b4b21a25 100644 --- a/types/react-onclickoutside/v5/index.d.ts +++ b/types/react-onclickoutside/v5/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/Pomax/react-onclickoutside // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-onsenui/index.d.ts b/types/react-onsenui/index.d.ts index 91055d25b4..39722faa7c 100644 --- a/types/react-onsenui/index.d.ts +++ b/types/react-onsenui/index.d.ts @@ -2,7 +2,7 @@ // Project: https://onsen.io/v2/docs/guide/react/ // Definitions by: Ozytis , Salim , Jemmyw // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import Component = React.Component; diff --git a/types/react-overlays/index.d.ts b/types/react-overlays/index.d.ts index 99df3b3cbd..a8df0341be 100644 --- a/types/react-overlays/index.d.ts +++ b/types/react-overlays/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Aaron Beall // Vito Samson // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-owl-carousel/index.d.ts b/types/react-owl-carousel/index.d.ts index bcd9af38b5..365ea39598 100644 --- a/types/react-owl-carousel/index.d.ts +++ b/types/react-owl-carousel/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/seal789ie/react-owl-carousel // Definitions by: T Bounsiar , Ismael Gorissen , Kenneth Ceyer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-paginate/index.d.ts b/types/react-paginate/index.d.ts index 0030028055..83d8c476c9 100644 --- a/types/react-paginate/index.d.ts +++ b/types/react-paginate/index.d.ts @@ -5,7 +5,7 @@ // pegel03 // Simon Archer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-places-autocomplete/index.d.ts b/types/react-places-autocomplete/index.d.ts index f05820bbce..62e3d93a1d 100644 --- a/types/react-places-autocomplete/index.d.ts +++ b/types/react-places-autocomplete/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Guilherme Hübner // Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // /// diff --git a/types/react-pointable/index.d.ts b/types/react-pointable/index.d.ts index 0b83bdeb1d..9c0828fc76 100644 --- a/types/react-pointable/index.d.ts +++ b/types/react-pointable/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Stefan Fochler // Dibyo Majumdar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-popover/index.d.ts b/types/react-popover/index.d.ts index fed9c4c32d..a7bc435d2e 100644 --- a/types/react-popover/index.d.ts +++ b/types/react-popover/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/littlebits/react-popover // Definitions by: Jakub Řičař // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-portal/index.d.ts b/types/react-portal/index.d.ts index 2994290013..5faff72d87 100644 --- a/types/react-portal/index.d.ts +++ b/types/react-portal/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Shun Takahashi // Horus Lugo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-primitives/index.d.ts b/types/react-primitives/index.d.ts index 881b3c6a91..7d276c6a94 100644 --- a/types/react-primitives/index.d.ts +++ b/types/react-primitives/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/lelandrichardson/react-primitives // Definitions by: Ahmed Ghoneim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentType } from 'react'; import { diff --git a/types/react-radio-group/index.d.ts b/types/react-radio-group/index.d.ts index 561599ed0a..809553e497 100644 --- a/types/react-radio-group/index.d.ts +++ b/types/react-radio-group/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chenglou/react-radio-group // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-recaptcha/index.d.ts b/types/react-recaptcha/index.d.ts index 595cc1916e..614bc50f0f 100644 --- a/types/react-recaptcha/index.d.ts +++ b/types/react-recaptcha/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Mohamed Hegazy // Zach // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; diff --git a/types/react-redux-epic/index.d.ts b/types/react-redux-epic/index.d.ts index f9bba811f8..a059786123 100644 --- a/types/react-redux-epic/index.d.ts +++ b/types/react-redux-epic/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/BerkeleyTrue/react-redux-epic#readme // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Observable } from 'rxjs/Observable'; diff --git a/types/react-redux-i18n/index.d.ts b/types/react-redux-i18n/index.d.ts index 7c133448e8..9d91ab025c 100644 --- a/types/react-redux-i18n/index.d.ts +++ b/types/react-redux-i18n/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zoover/react-redux-i18n // Definitions by: Clément Devos // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module 'react-redux-i18n' { import * as react from "react" diff --git a/types/react-redux/v5/index.d.ts b/types/react-redux/v5/index.d.ts index 0e3b6ffb88..6dc8844f1e 100644 --- a/types/react-redux/v5/index.d.ts +++ b/types/react-redux/v5/index.d.ts @@ -9,7 +9,7 @@ // Dibyo Majumdar // Prashant Deva // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 // Known Issue: // There is a known issue in TypeScript, which doesn't allow decorators to change the signature of the classes diff --git a/types/react-resize-detector/index.d.ts b/types/react-resize-detector/index.d.ts index 5277109c2e..ee9341a358 100644 --- a/types/react-resize-detector/index.d.ts +++ b/types/react-resize-detector/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/maslianok/react-resize-detector // Definitions by: Matthew James , James Greenleaf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-resolver/index.d.ts b/types/react-resolver/index.d.ts index c871426401..f8e0807fab 100644 --- a/types/react-resolver/index.d.ts +++ b/types/react-resolver/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ericclemmons/react-resolver // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentType, StatelessComponent, Factory } from 'react'; diff --git a/types/react-responsive/index.d.ts b/types/react-responsive/index.d.ts index ad042a34c5..0fa9978c8f 100644 --- a/types/react-responsive/index.d.ts +++ b/types/react-responsive/index.d.ts @@ -4,7 +4,7 @@ // Alec Hill // Javier Gonzalez // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-responsive/v1/index.d.ts b/types/react-responsive/v1/index.d.ts index f9c3bfcf83..789278508a 100644 --- a/types/react-responsive/v1/index.d.ts +++ b/types/react-responsive/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/contra/react-responsive // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-rnd/index.d.ts b/types/react-rnd/index.d.ts index ff5ac2078e..ef7fb89674 100644 --- a/types/react-rnd/index.d.ts +++ b/types/react-rnd/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ragg // fsubal // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; type CSSProperties = React.CSSProperties; diff --git a/types/react-router/v2/index.d.ts b/types/react-router/v2/index.d.ts index 68f9c3f38f..3f24c22c2c 100644 --- a/types/react-router/v2/index.d.ts +++ b/types/react-router/v2/index.d.ts @@ -7,7 +7,7 @@ // Alex Wendland // Kostya Esmukov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactRouter; diff --git a/types/react-router/v3/index.d.ts b/types/react-router/v3/index.d.ts index 9ca93b3a9b..ee4e01ba40 100644 --- a/types/react-router/v3/index.d.ts +++ b/types/react-router/v3/index.d.ts @@ -11,7 +11,7 @@ // Dovydas Navickas // Ross Allen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export { ChangeHook, diff --git a/types/react-s-alert/index.d.ts b/types/react-s-alert/index.d.ts index bd014abd0a..d55aae1105 100644 --- a/types/react-s-alert/index.d.ts +++ b/types/react-s-alert/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/juliancwirko/react-s-alert // Definitions by: mitsuruog // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-scroll/index.d.ts b/types/react-scroll/index.d.ts index f04e6d86ff..bc22a9f445 100644 --- a/types/react-scroll/index.d.ts +++ b/types/react-scroll/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Ioannis Kokkinidis // Giedrius Grabauskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as ReactScroll from "./modules/index"; export = ReactScroll; diff --git a/types/react-scrollbar/index.d.ts b/types/react-scrollbar/index.d.ts index f551d83ebd..ef99d8ab94 100644 --- a/types/react-scrollbar/index.d.ts +++ b/types/react-scrollbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souhe/reactScrollbar // Definitions by: Stephen Jelfs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-share/index.d.ts b/types/react-share/index.d.ts index 756b917014..6fe45b124c 100644 --- a/types/react-share/index.d.ts +++ b/types/react-share/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/nygardk/react-share#readme // Definitions by: icopp // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-show-more/index.d.ts b/types/react-show-more/index.d.ts index e411726c52..efa2459148 100644 --- a/types/react-show-more/index.d.ts +++ b/types/react-show-more/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/One-com/react-show-more // Definitions by: Naor Torgeman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-side-effect/index.d.ts b/types/react-side-effect/index.d.ts index 1f15038c4b..977db41611 100644 --- a/types/react-side-effect/index.d.ts +++ b/types/react-side-effect/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Remo H. Jansen // Martin Charles // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-sidebar/index.d.ts b/types/react-sidebar/index.d.ts index da6d9e0f79..1aec2497da 100644 --- a/types/react-sidebar/index.d.ts +++ b/types/react-sidebar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/balloob/react-sidebar#readme // Definitions by: Jeroen Vervaeke // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; diff --git a/types/react-sketchapp/index.d.ts b/types/react-sketchapp/index.d.ts index 67ade07673..6152bd7b07 100644 --- a/types/react-sketchapp/index.d.ts +++ b/types/react-sketchapp/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Rico Kahler // DomiR // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-slick/index.d.ts b/types/react-slick/index.d.ts index e9f03b80fa..d20aef9a02 100644 --- a/types/react-slick/index.d.ts +++ b/types/react-slick/index.d.ts @@ -4,7 +4,7 @@ // Giedrius Grabauskas // Andrew Makarov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-slider/index.d.ts b/types/react-slider/index.d.ts index 446f3159e3..25cbb5c9b8 100644 --- a/types/react-slider/index.d.ts +++ b/types/react-slider/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mpowaga/react-slider // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import * as React from 'react'; import * as motion from 'react-motion'; diff --git a/types/react-smooth-scrollbar/index.d.ts b/types/react-smooth-scrollbar/index.d.ts index c0aa21a0ff..85b4a736c3 100644 --- a/types/react-smooth-scrollbar/index.d.ts +++ b/types/react-smooth-scrollbar/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/idiotWu/react-smooth-scrollbar // Definitions by: Alexey Svetliakov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import SmoothScrollbar from "smooth-scrollbar"; diff --git a/types/react-sortable-hoc/index.d.ts b/types/react-sortable-hoc/index.d.ts index 9963ebd69e..6a89c766e5 100644 --- a/types/react-sortable-hoc/index.d.ts +++ b/types/react-sortable-hoc/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/clauderic/react-sortable-hoc // Definitions by: Ivo Stratev , Charles Rey // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-sortable-pane/index.d.ts b/types/react-sortable-pane/index.d.ts index f8d3eba15f..16e14eaff2 100644 --- a/types/react-sortable-pane/index.d.ts +++ b/types/react-sortable-pane/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/bokuweb/react-sortable-pane // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-spinkit/index.d.ts b/types/react-spinkit/index.d.ts index 9e4a5f0cff..9d723ccc11 100644 --- a/types/react-spinkit/index.d.ts +++ b/types/react-spinkit/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/KyleAMathews/react-spinkit // Definitions by: Qubo , Mleko , Tom Crockett , zzanol // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-spinkit/v1/index.d.ts b/types/react-spinkit/v1/index.d.ts index ec841afd4b..2e616371e8 100644 --- a/types/react-spinkit/v1/index.d.ts +++ b/types/react-spinkit/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/KyleAMathews/react-spinkit // Definitions by: Qubo , Mleko , Tom Crockett // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-sticky-el/index.d.ts b/types/react-sticky-el/index.d.ts index b41d48c454..da831c9d61 100644 --- a/types/react-sticky-el/index.d.ts +++ b/types/react-sticky-el/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gm0t/react-sticky-el // Definitions by: Justin Braithwaite // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-sticky/index.d.ts b/types/react-sticky/index.d.ts index 86091531e9..0bc4e2c0f2 100644 --- a/types/react-sticky/index.d.ts +++ b/types/react-sticky/index.d.ts @@ -4,7 +4,7 @@ // Curtis Warren , // Andrew Hyndman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-stripe-elements/index.d.ts b/types/react-stripe-elements/index.d.ts index 27d124f78a..32a94b0639 100644 --- a/types/react-stripe-elements/index.d.ts +++ b/types/react-stripe-elements/index.d.ts @@ -6,7 +6,7 @@ // Andrew Goh Yisheng // Thomas Chia // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import * as React from 'react'; diff --git a/types/react-svg-inline/index.d.ts b/types/react-svg-inline/index.d.ts index 8e85be5b1a..849d5772b0 100644 --- a/types/react-svg-inline/index.d.ts +++ b/types/react-svg-inline/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/MoOx/react-svg-inline // Definitions by: kiyopikko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-svg-pan-zoom/index.d.ts b/types/react-svg-pan-zoom/index.d.ts index f825694915..c2636a8d6d 100644 --- a/types/react-svg-pan-zoom/index.d.ts +++ b/types/react-svg-pan-zoom/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chrvadala/react-svg-pan-zoom#readme // Definitions by: Huy Nguyen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-swf/index.d.ts b/types/react-swf/index.d.ts index c37aff3d69..119b566ad8 100644 --- a/types/react-swf/index.d.ts +++ b/types/react-swf/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/syranide/react-swf // Definitions by: Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; export as namespace ReactSWF; diff --git a/types/react-swipe/index.d.ts b/types/react-swipe/index.d.ts index fb7d02055f..8b5c2d2a2d 100644 --- a/types/react-swipe/index.d.ts +++ b/types/react-swipe/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/voronianski/react-swipe // Definitions by: Deividas Bakanas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-swipeable-views/index.d.ts b/types/react-swipeable-views/index.d.ts index dedc165871..68545673e6 100644 --- a/types/react-swipeable-views/index.d.ts +++ b/types/react-swipeable-views/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Michael Ledin // Deividas Bakanas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-swipeable/index.d.ts b/types/react-swipeable/index.d.ts index b39a7b29ea..643d053b40 100644 --- a/types/react-swipeable/index.d.ts +++ b/types/react-swipeable/index.d.ts @@ -4,7 +4,7 @@ // Konstantin Vasilev // Hiroki Horiuchi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-syntax-highlighter/index.d.ts b/types/react-syntax-highlighter/index.d.ts index b751e75bf1..c9590f15a4 100644 --- a/types/react-syntax-highlighter/index.d.ts +++ b/types/react-syntax-highlighter/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/conorhastings/react-syntax-highlighter // Definitions by: Ivo Stratev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module 'react-syntax-highlighter' { import SyntaxHighlighter from 'react-syntax-highlighter/light'; diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index ebe531ecfa..c58f54eefc 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/react-tools/react-table // Definitions by: Roy Xue , Pavel Sakalo , Krzysztof Porębski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; export type ReactTableFunction = (value?: any) => void; diff --git a/types/react-tabs/index.d.ts b/types/react-tabs/index.d.ts index 9c053d465e..9740d1366e 100644 --- a/types/react-tabs/index.d.ts +++ b/types/react-tabs/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/reactjs/react-tabs/ // Definitions by: Yuu Igarashi , Daniel Tschinder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-tag-input/index.d.ts b/types/react-tag-input/index.d.ts index 54ae20b8c9..c6f905788f 100644 --- a/types/react-tag-input/index.d.ts +++ b/types/react-tag-input/index.d.ts @@ -4,7 +4,7 @@ // Jan Karres // Matthew Berryman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-tagcloud/index.d.ts b/types/react-tagcloud/index.d.ts index 4f6987cb5f..61725d0b2c 100644 --- a/types/react-tagcloud/index.d.ts +++ b/types/react-tagcloud/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/madox2/react-tagcloud // Definitions by: wassname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-tagsinput/index.d.ts b/types/react-tagsinput/index.d.ts index 4de3a4b8ac..d234a19c12 100644 --- a/types/react-tagsinput/index.d.ts +++ b/types/react-tagsinput/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/olahol/react-tagsinput // Definitions by: Michael Macnair // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-test-renderer/index.d.ts b/types/react-test-renderer/index.d.ts index d069686903..834664c11d 100644 --- a/types/react-test-renderer/index.d.ts +++ b/types/react-test-renderer/index.d.ts @@ -5,7 +5,7 @@ // John Reilly // John Gozde // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactElement, ReactType } from "react"; diff --git a/types/react-test-renderer/v15/index.d.ts b/types/react-test-renderer/v15/index.d.ts index 753f4ef19d..9c65a34140 100644 --- a/types/react-test-renderer/v15/index.d.ts +++ b/types/react-test-renderer/v15/index.d.ts @@ -2,7 +2,7 @@ // Project: https://facebook.github.io/react/ // Definitions by: Arvitaly , Lochbrunner , Lochbrunner , John Reilly // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactElement } from "react"; diff --git a/types/react-tether/index.d.ts b/types/react-tether/index.d.ts index 1012c8254b..8268550eb5 100644 --- a/types/react-tether/index.d.ts +++ b/types/react-tether/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/souporserious/react-tether // Definitions by: Ryan Price // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export default TetherComponent; export as namespace ReactTether; diff --git a/types/react-text-mask/index.d.ts b/types/react-text-mask/index.d.ts index d598fcf711..f59878e83f 100644 --- a/types/react-text-mask/index.d.ts +++ b/types/react-text-mask/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/text-mask/text-mask // Definitions by: Guilherme Hübner , Deividi Cavarzan // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-textarea-autosize/index.d.ts b/types/react-textarea-autosize/index.d.ts index de52335683..90fa858dfb 100644 --- a/types/react-textarea-autosize/index.d.ts +++ b/types/react-textarea-autosize/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/andreypopp/react-textarea-autosize // Definitions by: Alexey Svetliakov , Jerry Zou // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 declare module "react-textarea-autosize" { import * as React from "react"; diff --git a/types/react-timeout/index.d.ts b/types/react-timeout/index.d.ts index b214318a23..a360b47c5a 100644 --- a/types/react-timeout/index.d.ts +++ b/types/react-timeout/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/plougsgaard/react-timeout // Definitions by: Kerwyn Rojas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-toastify/index.d.ts b/types/react-toastify/index.d.ts index e77ef01837..0bde299cd4 100644 --- a/types/react-toastify/index.d.ts +++ b/types/react-toastify/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/fkhadra/react-toastify#readme // Definitions by: icopp // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Transition } from 'react-transition-group'; diff --git a/types/react-toastr/index.d.ts b/types/react-toastr/index.d.ts index 8320244d7f..7b822ad601 100644 --- a/types/react-toastr/index.d.ts +++ b/types/react-toastr/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tomchentw/react-toastr // Definitions by: Josh Holmer , Dan Regazzi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, ReactHTML } from 'react'; diff --git a/types/react-toggle/index.d.ts b/types/react-toggle/index.d.ts index 015daff31e..0d625cff55 100644 --- a/types/react-toggle/index.d.ts +++ b/types/react-toggle/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/aaronshaf/react-toggle // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, InputHTMLAttributes, ReactNode } from "react"; diff --git a/types/react-toggle/v2/index.d.ts b/types/react-toggle/v2/index.d.ts index e2d2d5f0b2..388121e5a8 100644 --- a/types/react-toggle/v2/index.d.ts +++ b/types/react-toggle/v2/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Karol Janyst // Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import { ComponentClass, InputHTMLAttributes, ReactNode } from "react"; diff --git a/types/react-tooltip/index.d.ts b/types/react-tooltip/index.d.ts index 044e737402..868e49e4ca 100644 --- a/types/react-tooltip/index.d.ts +++ b/types/react-tooltip/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/wwayne/react-tooltip // Definitions by: Deividas Bakanas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-touch/index.d.ts b/types/react-touch/index.d.ts index 3e714b2b6c..16ba4f39ba 100644 --- a/types/react-touch/index.d.ts +++ b/types/react-touch/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/leonaves/react-touch // Definitions by: Grzegorz Kielak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-tracking/index.d.ts b/types/react-tracking/index.d.ts index 8705a32781..c0e4571bd5 100644 --- a/types/react-tracking/index.d.ts +++ b/types/react-tracking/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/NYTimes/react-tracking // Definitions by: Eloy Durán // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-transition-group/index.d.ts b/types/react-transition-group/index.d.ts index dbe906f679..785e1f1941 100644 --- a/types/react-transition-group/index.d.ts +++ b/types/react-transition-group/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Karol Janyst // Epskampie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import CSSTransition = require("./CSSTransition"); import Transition from "./Transition"; diff --git a/types/react-transition-group/v1/index.d.ts b/types/react-transition-group/v1/index.d.ts index 42dea4ba15..016d1f3b48 100644 --- a/types/react-transition-group/v1/index.d.ts +++ b/types/react-transition-group/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/reactjs/react-transition-group // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { HTMLAttributes, ReactElement, ReactType } from "react"; diff --git a/types/react-treeview/index.d.ts b/types/react-treeview/index.d.ts index 2bfacc3eee..83f60eb5f2 100644 --- a/types/react-treeview/index.d.ts +++ b/types/react-treeview/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chenglou/react-treeview // Definitions by: Jay Anslow // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, HTMLAttributes } from 'react'; diff --git a/types/react-truncate/index.d.ts b/types/react-truncate/index.d.ts index 15c72616c0..13de471a93 100644 --- a/types/react-truncate/index.d.ts +++ b/types/react-truncate/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/One-com/react-truncate // Definitions by: Matt Perry // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-twitter-auth/index.d.ts b/types/react-twitter-auth/index.d.ts index 46dc5e7aa7..cb3faf43fa 100644 --- a/types/react-twitter-auth/index.d.ts +++ b/types/react-twitter-auth/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/GenFirst/react-twitter-auth // Definitions by: Paul Fasola // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 interface TwitterLoginProps { tag?: React.ReactType; diff --git a/types/react-user-tour/index.d.ts b/types/react-user-tour/index.d.ts index 6fdbc2da13..1e704d5306 100644 --- a/types/react-user-tour/index.d.ts +++ b/types/react-user-tour/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/socialtables/react-user-tour // Definitions by: Carlo Cancellieri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/react-virtual-keyboard/index.d.ts b/types/react-virtual-keyboard/index.d.ts index 03597e82e6..705dfc5682 100644 --- a/types/react-virtual-keyboard/index.d.ts +++ b/types/react-virtual-keyboard/index.d.ts @@ -2,7 +2,7 @@ // Project: https://www.npmjs.com/package/react-virtual-keyboard // Definitions by: Bogdan Surai // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from "react"; import { KeyboardOptions, NavigateOptions } from "virtual-keyboard"; diff --git a/types/react-webcam/index.d.ts b/types/react-webcam/index.d.ts index 5bb6337838..5986af5c75 100644 --- a/types/react-webcam/index.d.ts +++ b/types/react-webcam/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mozmorris/react-webcam // Definitions by: Lucas Servén Marín // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-widgets/index.d.ts b/types/react-widgets/index.d.ts index 8115208fa8..df804235e0 100644 --- a/types/react-widgets/index.d.ts +++ b/types/react-widgets/index.d.ts @@ -6,7 +6,7 @@ // Andrew Makarov // Maxime Billemaz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-youtube-embed/index.d.ts b/types/react-youtube-embed/index.d.ts index 9fcb2f81cb..3327516ad9 100644 --- a/types/react-youtube-embed/index.d.ts +++ b/types/react-youtube-embed/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/escaladesports/react-youtube-embed#readme // Definitions by: Charles Salmon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-youtube/index.d.ts b/types/react-youtube/index.d.ts index 65b5858ae6..fe9baf2e42 100644 --- a/types/react-youtube/index.d.ts +++ b/types/react-youtube/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/troybetz/react-youtube // Definitions by: kgtkr // Definitions: https://github.com/borisyankov/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; export default class YouTube extends React.Component<{ diff --git a/types/reactable/index.d.ts b/types/reactable/index.d.ts index 8e3cb8873c..e4315030af 100644 --- a/types/reactable/index.d.ts +++ b/types/reactable/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/glittershark/reactable // Definitions by: Christoph Spielmann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/reactcss/index.d.ts b/types/reactcss/index.d.ts index c5fb14bd32..eba4063e2b 100644 --- a/types/reactcss/index.d.ts +++ b/types/reactcss/index.d.ts @@ -2,7 +2,7 @@ // Project: http://reactcss.com/ // Definitions by: Chris Gervang , Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react" diff --git a/types/reactstrap/v4/index.d.ts b/types/reactstrap/v4/index.d.ts index 93eeed908f..0a807b1131 100644 --- a/types/reactstrap/v4/index.d.ts +++ b/types/reactstrap/v4/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/reactstrap/reactstrap#readme // Definitions by: Ali Hammad Baig , Marco Falkenberg , Danilo Barros , Fábio Paiva // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export interface CSSModule { [className: string]: string; diff --git a/types/reapop/index.d.ts b/types/reapop/index.d.ts index a0f446fa91..c8b1f022fc 100644 --- a/types/reapop/index.d.ts +++ b/types/reapop/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/LouisBarranqueiro/reapop#readme // Definitions by: Barrokgl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { Dispatch } from 'redux'; diff --git a/types/rebass/index.d.ts b/types/rebass/index.d.ts index 0c55b12240..f209bed8ac 100644 --- a/types/rebass/index.d.ts +++ b/types/rebass/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jxnblk/rebass // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 0dc9618dad..dc96bdbe46 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -11,7 +11,7 @@ // Paul Melnikow // Harry Cruse // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { CurveFactory } from 'd3-shape'; diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index e202e85d44..49d872c902 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -6,7 +6,7 @@ // Rasmus Eneman // Lucas Terra // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/recompose/recompose-tests.tsx b/types/recompose/recompose-tests.tsx index b89bd5e2c9..8c45ac2021 100644 --- a/types/recompose/recompose-tests.tsx +++ b/types/recompose/recompose-tests.tsx @@ -132,7 +132,7 @@ function testWithHandlers() { onSubmit: React.MouseEventHandler; onChange: Function; } - const InnerComponent: React.StatelessComponent = ({onChange, onSubmit, foo}) => + const InnerComponent: React.StatelessComponent = ({onChange, onSubmit, foo}) =>
{foo}
; const enhancer = withHandlers({ diff --git a/types/redux-auth-wrapper/v1/index.d.ts b/types/redux-auth-wrapper/v1/index.d.ts index 366ee7bfdb..cca415812a 100644 --- a/types/redux-auth-wrapper/v1/index.d.ts +++ b/types/redux-auth-wrapper/v1/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/mjrussell/redux-auth-wrapper // Definitions by: Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, StatelessComponent, ReactType } from "react"; import { Action } from "redux"; diff --git a/types/redux-auth-wrapper/v1/package.json b/types/redux-auth-wrapper/v1/package.json new file mode 100644 index 0000000000..b5b3eb5dd8 --- /dev/null +++ b/types/redux-auth-wrapper/v1/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "redux": "^3.7.2" + } +} diff --git a/types/redux-devtools-dock-monitor/index.d.ts b/types/redux-devtools-dock-monitor/index.d.ts index 025b24625d..b0cc4a55a8 100644 --- a/types/redux-devtools-dock-monitor/index.d.ts +++ b/types/redux-devtools-dock-monitor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gaearon/redux-devtools-dock-monitor // Definitions by: Petryshyn Sergii // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/redux-devtools-log-monitor/index.d.ts b/types/redux-devtools-log-monitor/index.d.ts index 8bbaad7e1f..94d960f51a 100644 --- a/types/redux-devtools-log-monitor/index.d.ts +++ b/types/redux-devtools-log-monitor/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/gaearon/redux-devtools-log-monitor // Definitions by: Petryshyn Sergii // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react' import { ColorScheme } from 'base16' diff --git a/types/redux-first-router-link/index.d.ts b/types/redux-first-router-link/index.d.ts index c99f5b6ac1..8625433b03 100644 --- a/types/redux-first-router-link/index.d.ts +++ b/types/redux-first-router-link/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/faceyspacey/redux-first-router-link#readme // Definitions by: janb87 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { Location } from 'redux-first-router'; diff --git a/types/redux-infinite-scroll/index.d.ts b/types/redux-infinite-scroll/index.d.ts index 30fa435e2d..70ce20faf4 100644 --- a/types/redux-infinite-scroll/index.d.ts +++ b/types/redux-infinite-scroll/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/RealScout/redux-infinite-scroll // Definitions by: Tony Nikolov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component, HTMLProps } from "react"; diff --git a/types/redux-router/index.d.ts b/types/redux-router/index.d.ts index bb9764ed61..710aaca0a5 100644 --- a/types/redux-router/index.d.ts +++ b/types/redux-router/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/rackt/redux-router // Definitions by: Stepan Mikhaylyuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactRouter from 'react-router'; diff --git a/types/redux-ui/index.d.ts b/types/redux-ui/index.d.ts index 52cfb24b1d..55061e9a28 100644 --- a/types/redux-ui/index.d.ts +++ b/types/redux-ui/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tonyhb/redux-ui // Definitions by: Andy Shu Xin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import * as Redux from 'redux'; diff --git a/types/rheostat/index.d.ts b/types/rheostat/index.d.ts index be173bf31a..9e62865ce9 100644 --- a/types/rheostat/index.d.ts +++ b/types/rheostat/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/airbnb/rheostat // Definitions by: Sasha Bayan , Wil Lee // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/slate-html-serializer/index.d.ts b/types/slate-html-serializer/index.d.ts index cee3041d69..a0bd15f186 100644 --- a/types/slate-html-serializer/index.d.ts +++ b/types/slate-html-serializer/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/ianstormtaylor/slate // Definitions by: Brandon Shelton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { BlockProperties, ValueJSON, Value, Node, Mark, Leaf } from 'slate'; diff --git a/types/slate-react/index.d.ts b/types/slate-react/index.d.ts index 3ef179a14b..0bf5c255a9 100644 --- a/types/slate-react/index.d.ts +++ b/types/slate-react/index.d.ts @@ -6,7 +6,7 @@ // Patrick Sachs // Brandon Shelton // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Mark, Node, Block, Change, Schema, Value, Stack } from 'slate'; import * as Immutable from 'immutable'; import * as React from 'react'; diff --git a/types/spectacle/index.d.ts b/types/spectacle/index.d.ts index cabd6cf5a1..e00b5dd3c0 100644 --- a/types/spectacle/index.d.ts +++ b/types/spectacle/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/FormidableLabs/victory // Definitions by: Zachary Maybury // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/storybook-addon-jsx/index.d.ts b/types/storybook-addon-jsx/index.d.ts index f29351ac68..80ec756d3a 100644 --- a/types/storybook-addon-jsx/index.d.ts +++ b/types/storybook-addon-jsx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: James Newell // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import '@storybook/react'; import { ReactNode } from 'react'; diff --git a/types/storybook__addon-a11y/index.d.ts b/types/storybook__addon-a11y/index.d.ts index c29f546b6f..7e7ac3b89e 100644 --- a/types/storybook__addon-a11y/index.d.ts +++ b/types/storybook__addon-a11y/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: HyunSeob // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { StoryDecorator } from '@storybook/react'; diff --git a/types/storybook__addon-actions/index.d.ts b/types/storybook__addon-actions/index.d.ts index 6c90ea4533..680777948c 100644 --- a/types/storybook__addon-actions/index.d.ts +++ b/types/storybook__addon-actions/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth , June // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export type HandlerFunction = (...args: any[]) => undefined; export type DecoratorFunction = (args: any[]) => any[]; diff --git a/types/storybook__addon-backgrounds/index.d.ts b/types/storybook__addon-backgrounds/index.d.ts index c76a6d160e..68b4a3d18b 100644 --- a/types/storybook__addon-backgrounds/index.d.ts +++ b/types/storybook__addon-backgrounds/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: HyunSeob // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { StoryDecorator } from '@storybook/react'; diff --git a/types/storybook__addon-centered/index.d.ts b/types/storybook__addon-centered/index.d.ts index 023d01fa97..23c7a06d97 100644 --- a/types/storybook__addon-centered/index.d.ts +++ b/types/storybook__addon-centered/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: kiyopikko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; import { StoryDecorator } from "@storybook/react"; diff --git a/types/storybook__addon-info/index.d.ts b/types/storybook__addon-info/index.d.ts index ebef2fed73..b460823f50 100644 --- a/types/storybook__addon-info/index.d.ts +++ b/types/storybook__addon-info/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Mark Kornblum // Mattias Wikstrom // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { RenderFunction } from '@storybook/react'; diff --git a/types/storybook__addon-jest/index.d.ts b/types/storybook__addon-jest/index.d.ts index f22e960e8a..a84b2588cd 100644 --- a/types/storybook__addon-jest/index.d.ts +++ b/types/storybook__addon-jest/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/storybooks/storybook // Definitions by: Matt Oliver // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { StoryDecorator } from '@storybook/react'; diff --git a/types/storybook__addon-knobs/index.d.ts b/types/storybook__addon-knobs/index.d.ts index 3c9bbe0fc4..f421303f94 100644 --- a/types/storybook__addon-knobs/index.d.ts +++ b/types/storybook__addon-knobs/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Joscha Feth // Martynas Kadisa // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { RenderFunction } from '@storybook/react'; diff --git a/types/storybook__addon-links/index.d.ts b/types/storybook__addon-links/index.d.ts index 99a9edc492..4d25a7150e 100644 --- a/types/storybook__addon-links/index.d.ts +++ b/types/storybook__addon-links/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Joscha Feth , // Jesse Pinho // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/storybook__addon-notes/index.d.ts b/types/storybook__addon-notes/index.d.ts index 1332cfcf7e..f212cbce63 100644 --- a/types/storybook__addon-notes/index.d.ts +++ b/types/storybook__addon-notes/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Joscha Feth // A.MacLeay // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import { RenderFunction } from '@storybook/react'; diff --git a/types/storybook__react-native/index.d.ts b/types/storybook__react-native/index.d.ts index 4bcd20ec30..1a0d0bee48 100644 --- a/types/storybook__react-native/index.d.ts +++ b/types/storybook__react-native/index.d.ts @@ -4,7 +4,7 @@ // Anton Izmailov // Alec Hill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as Storybook from '@storybook/react'; diff --git a/types/storybook__react/index.d.ts b/types/storybook__react/index.d.ts index 853295de25..3aa3445f61 100644 --- a/types/storybook__react/index.d.ts +++ b/types/storybook__react/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Joscha Feth // Anton Izmailov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/styled-jsx/index.d.ts b/types/styled-jsx/index.d.ts index 5e15388837..35f0112b6f 100644 --- a/types/styled-jsx/index.d.ts +++ b/types/styled-jsx/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/zeit/styled-jsx // Definitions by: R1ZZU // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import "react"; diff --git a/types/styled-system/index.d.ts b/types/styled-system/index.d.ts index 304db00c2a..d9c386242c 100644 --- a/types/styled-system/index.d.ts +++ b/types/styled-system/index.d.ts @@ -8,7 +8,7 @@ // Matthieu Vachon // Adam Lavin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as util from './dist/util'; diff --git a/types/tiny-slider-react/index.d.ts b/types/tiny-slider-react/index.d.ts index 9cf22beab7..81c8a38377 100644 --- a/types/tiny-slider-react/index.d.ts +++ b/types/tiny-slider-react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/jechav/tiny-slider-react#readme // Definitions by: Christian Rackerseder // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; export interface CommonOptions { diff --git a/types/victory/index.d.ts b/types/victory/index.d.ts index 6f152a9fcb..5b245440bd 100644 --- a/types/victory/index.d.ts +++ b/types/victory/index.d.ts @@ -5,7 +5,7 @@ // Krzysztof Cebula // Vitaliy Polyanskiy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// diff --git a/types/why-did-you-update/index.d.ts b/types/why-did-you-update/index.d.ts index f7f4fb820a..f9d1a60939 100644 --- a/types/why-did-you-update/index.d.ts +++ b/types/why-did-you-update/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/garbles/why-did-you-update // Definitions by: rhysd // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// From 6b9e17df582ae11877c84975499e986d8c8dfe59 Mon Sep 17 00:00:00 2001 From: Olly Levett Date: Mon, 6 Aug 2018 14:48:25 +0100 Subject: [PATCH 06/49] Add jqueryui slider class type (#27896) --- types/jqueryui/index.d.ts | 11 +++++++++++ types/jqueryui/jqueryui-tests.ts | 1 + 2 files changed, 12 insertions(+) diff --git a/types/jqueryui/index.d.ts b/types/jqueryui/index.d.ts index a02e3ceb73..a979c65c7a 100644 --- a/types/jqueryui/index.d.ts +++ b/types/jqueryui/index.d.ts @@ -698,6 +698,17 @@ declare namespace JQueryUI { value?: number; values?: number[]; highlight?: boolean; + classes? : SliderClasses; + } + + interface SliderClasses { + "ui-slider"?: string; + "ui-slider-horizontal"?: string; + "ui-slider-vertical"?: string; + "ui-slider-handle"?: string; + "ui-slider-range"?: string; + "ui-slider-range-min"?: string; + "ui-slider-range-max"?: string; } interface SliderUIParams { diff --git a/types/jqueryui/jqueryui-tests.ts b/types/jqueryui/jqueryui-tests.ts index a9f6f0b5ff..32712b8085 100644 --- a/types/jqueryui/jqueryui-tests.ts +++ b/types/jqueryui/jqueryui-tests.ts @@ -1599,6 +1599,7 @@ function test_slider() { $(".selector").slider({ step: 5 }); $(".selector").slider({ value: 10 }); $(".selector").slider({ values: [10, 25] }); + $(".selector").slider({ classes: { "ui-slider": "custom", "ui-slider-handle": "custom-handle" } } ); } From ddfe0d3b08fa1b0518a10552892f6ec8b6ecc19f Mon Sep 17 00:00:00 2001 From: Mohammad Hossein Amri Date: Tue, 7 Aug 2018 00:26:34 +0800 Subject: [PATCH 07/49] add convert function to quill's clipboard api (#27830) * add convert function to quill's clipboard api * create test for quill convert and rename some test function for consistency * arrange the code for better diff * fix test case * add my name and github --- types/quill/index.d.ts | 2 ++ types/quill/quill-tests.ts | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index afbdfa9222..4fdeef44a0 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -4,6 +4,7 @@ // Guillaume // James Garbutt // Aniello Falcone +// Mohammad Hossein Amri // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { Blot } from 'parchment/dist/src/blot/abstract/blot'; @@ -42,6 +43,7 @@ export interface KeyboardStatic { } export interface ClipboardStatic { + convert(html: string|Blot): DeltaStatic; addMatcher(selectorOrNodeType: string|number, callback: (node: any, delta: DeltaStatic) => DeltaStatic): void; dangerouslyPasteHTML(html: string, source?: Sources): void; dangerouslyPasteHTML(index: number, html: string, source?: Sources): void; diff --git a/types/quill/quill-tests.ts b/types/quill/quill-tests.ts index d0bc3a2189..96527a8158 100644 --- a/types/quill/quill-tests.ts +++ b/types/quill/quill-tests.ts @@ -129,7 +129,7 @@ function test_updateContents() { })); } -function test_setContents() { +function test_setDeltaContents() { const quillEditor = new Quill('#editor'); quillEditor.setContents(new Delta({ ops: [ { insert: 'Hello ' }, @@ -138,11 +138,18 @@ function test_setContents() { ]})); } -function test_setText() { +function test_setTextContents() { const quillEditor = new Quill('#editor'); quillEditor.setText('Hello\n'); } +function test_setHtmlContents() { + const quillEditor = new Quill('#editor'); + const html = "this is a bold text"; + const delta = quillEditor.clipboard.convert(html); + quillEditor.setContents(delta); +} + function test_getSelection() { const quillEditor = new Quill('#editor'); const range = quillEditor.getSelection(); From 92aa146b06370c52cf1f610967f16120820e2261 Mon Sep 17 00:00:00 2001 From: loc Date: Mon, 6 Aug 2018 09:27:45 -0700 Subject: [PATCH 08/49] Add types for sdp-transform (#27716) * add types * add test * add missing function definitions --- types/sdp-transform/index.d.ts | 265 +++++++++++++++++++++ types/sdp-transform/sdp-transform-tests.ts | 10 + types/sdp-transform/tsconfig.json | 23 ++ types/sdp-transform/tslint.json | 1 + 4 files changed, 299 insertions(+) create mode 100644 types/sdp-transform/index.d.ts create mode 100644 types/sdp-transform/sdp-transform-tests.ts create mode 100644 types/sdp-transform/tsconfig.json create mode 100644 types/sdp-transform/tslint.json diff --git a/types/sdp-transform/index.d.ts b/types/sdp-transform/index.d.ts new file mode 100644 index 0000000000..3219fe9957 --- /dev/null +++ b/types/sdp-transform/index.d.ts @@ -0,0 +1,265 @@ +// Type definitions for sdp-transform 2.4 +// Project: https://github.com/clux/sdp-transform#readme +// Definitions by: @loc +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +// https://tools.ietf.org/html/rfc4566 +// https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml + +export function write(description: SessionDescription): string; +export function parse(description: string): SessionDescription; +export function parsePayloads(payloads: string): number[]; +export function parseRemoteCandidates(candidates: string): Array<{ + component: number; + ip: string; + port: number; +}>; +export function parseSimulcastStreamList(streams: string): Array<{ + scid: number | string; + paused: boolean; +}>; +export interface ParamMap { + [paramName: string]: number | string; +} +export function parseParams(params: string): ParamMap; +export function parseImageAttributes(params: string): ParamMap[]; + +export interface MediaDescription extends SharedDescriptionFields, MediaAttributes {} + +/** + * Descriptor fields that exist only at the session level (before an m= block). + * + * See the SDP grammar for more details: https://tools.ietf.org/html/rfc4566#section-9 + */ +export interface SessionDescription extends SharedDescriptionFields, SessionAttributes { + version?: number; + // o= + origin?: { + username: string; + sessionId: string | number; + sessionVersion: number; + netType: string; + address: string; + }; + // s= + name?: string; + // u= + uri?: string; + // e= + email?: string; + // p= + phone?: string; + // t=0 0 + timing?: { + start: number; + stop: number; + }; + // z= + timezones?: string; + // r= + repeats?: string; + // m= + media: Array<{ + type: string; + port: number; + protocol: string; + payloads?: string; + } & MediaDescription>; +} + +/** + * These attributes can exist on both the session level and the media level. + * + * https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-8 + */ +export interface SharedAttributes { + // a=sendrecv + // a=recvonly + // a=sendonly + // a=inactive + direction?: 'sendrecv' | 'recvonly' | 'sendonly' | 'inactive'; + // a=control + control?: string; + // a=extmap + ext?: { + value: number; + direction?: string; + uri: string; + config?: string; + }; + // a=setup + setup?: string; + + iceUfrag?: string; + icePwd?: string; + fingerprint?: { + type: string; + hash: string; + }; + // a=source-filter: incl IN IP4 239.5.2.31 10.1.15.5 + sourceFilter?: { + filterMode: 'excl' | 'incl'; + netType: string; + addressTypes: string; + destAddress: string; + srcList: string; + }; + invalid?: Array<{ value: string }>; +} + +/** + * Attributes that only exist at the session level (before an m= block). + * + * https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-7 + */ +export interface SessionAttributes extends SharedAttributes { + icelite?: string; + // a=ice-options:google-ice + iceOptions?: string; + // a=msid-semantic: WMS Jvlam5X3SX1OP6pn20zWogvaKJz5Hjf9OnlV + msidSemantic?: { + semantic: string; + token: string; + }; + // a=group:BUNDLE audio video + groups?: Array<{ + type: string; + mids: string; + }>; +} + +/** + * Attributes that only exist at the media level (within an m= block). + * + * https://www.iana.org/assignments/sdp-parameters/sdp-parameters.xhtml#sdp-parameters-9 + */ +export interface MediaAttributes extends SharedAttributes { + rtp?: { + payload: number; + codec: string; + rate?: number; + encoding?: number; + }; + rtcp?: { + port: number; + netType?: string; + ipVer?: number; + address?: string; + }; + // a=rtcp-fb:98 nack rpsi + rtcpFb?: { + payload: number; + type: string; + subtype?: string; + }; + // a=rtcp-fb:98 trr-int 100 + rtcpFbTrrInt?: { + payload: number; + value: number; + }; + // a=fmtp + fmtp?: { + payload: number; + config: string; + }; + // a=mid + mid?: string; + // a=msid + msid?: string; + ptime?: number; + // a=maxptime + maxptime?: number; + // a=crypto + crypto?: { + id: number; + suite: string; + config: string; + sessionConfig?: string; + }; + // a=candidate + candidates?: Array<{ + foundation: string; + component: number; + transport: string; + priority: number | string; + ip: string; + port: number; + type: string; + raddr: string; + rport: number; + tcptype: string; + generation: number; + 'network-id'?: number; + 'network-cost'?: number; + }>; + // a=end-of-candidates + endOfCandidates?: string; + // a=remote-candidates + remoteCandidates?: string; + // a=ssrc: + ssrcs?: Array<{ + id: number | string; + attribute: string; + value?: string; + }>; + // a=ssrc-group: + ssrcGroups?: Array<{ + semantics: string; + ssrcs: string; + }>; + // a=rtcp-mux + rtcpMux?: string; + // a=rtcp-rsize + rtcpRsize?: string; + // a=sctpmap + sctpmap?: { + sctpmapNumber: number | string; + app: string; + maxMessageSize: number; + }; + // a=x-google-flag + xGoogleFlag?: string; + // a=rid + rids?: Array<{ + id: number | string; + direction: string; + params?: string; + }>; + // a=imageattr + imageattrs?: Array<{ + pt: number | string; + dir1: string; + attrs1: string; + dir2?: string; + attrs2?: string; + }>; + simulcast?: { + dir1: string; + list1: string; + dir2?: string; + list2?: string; + }; + simulcast_03?: { value: string }; + // a=framerate + framerate?: number | string; +} + +/** + * Descriptor fields that exist at both the session level and media level. + * + * See the SDP grammar for more details: https://tools.ietf.org/html/rfc4566#section-9 + */ +export interface SharedDescriptionFields { + // i= + description?: string; + // c=IN IP4 10.47.197.26 + connection?: { + version: number; + ip: string; + }; + // b=AS:4000 + bandwidth?: { + type: 'TIAS' | 'AS' | 'CT' | 'RR' | 'RS'; + limit: number | string; + }; +} diff --git a/types/sdp-transform/sdp-transform-tests.ts b/types/sdp-transform/sdp-transform-tests.ts new file mode 100644 index 0000000000..4b60e84a5a --- /dev/null +++ b/types/sdp-transform/sdp-transform-tests.ts @@ -0,0 +1,10 @@ +import { + SessionDescription, + parse, + write, +} from 'sdp-transform'; + +const session: SessionDescription = parse(''); +const mediaType: string = session.media[0].type; +session.media[0].type = 'video'; +const sdp: string = write(session); diff --git a/types/sdp-transform/tsconfig.json b/types/sdp-transform/tsconfig.json new file mode 100644 index 0000000000..b4d6bb625b --- /dev/null +++ b/types/sdp-transform/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "sdp-transform-tests.ts" + ] +} diff --git a/types/sdp-transform/tslint.json b/types/sdp-transform/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/sdp-transform/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From e53465fb03a7e78453d74d018f4ed627310770fa Mon Sep 17 00:00:00 2001 From: Junyoung Clare Jang Date: Mon, 6 Aug 2018 12:28:20 -0400 Subject: [PATCH 09/49] Add korean readme (#27742) --- README.ko.md | 338 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 README.ko.md diff --git a/README.ko.md b/README.ko.md new file mode 100644 index 0000000000..224967a9dc --- /dev/null +++ b/README.ko.md @@ -0,0 +1,338 @@ +# DefinitelyTyped [![Build Status](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped.svg?branch=master)](https://travis-ci.org/DefinitelyTyped/DefinitelyTyped) + +[![깃터(https://gitter.im/borisyankov/DefinitelyTyped)에서 대화에 참여해보세요](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/borisyankov/DefinitelyTyped?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +> 이 저장소는 고품질의 타입스크립트(TypeScript) 자료형 정의(Type definition)를 위한 저장소입니다. + +이 문서가 가장 최신 내용을 담고있긴 하지만, [공식 사이트(definitelytyped.org)](http://definitelytyped.org)도 확인해보시면 좋습니다. + +## 선언 파일(Declaration file)이 뭔가요? + +[타입스크립트 안내서(TypeScript handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)를 읽어보세요. + +## 선언 파일(Declaration file)을 어떻게 받을 수 있나요?? + +### npm 사용하기 + +아래 방법은 타입스크립트(TypeScript) 2.0+ 이상의 버전을 사용하는 사람들만 사용할 수 있는 방법이기는 합니다만, 이 방법을 사용하기를 장려합니다. + +```sh +npm install --save-dev @types/node +``` + +`node` 를 위한 자료형(Typing)이 컴파일 과정에 자동으로 포함될 겁니다. +더 자세한 내용은 [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)에서 확인해보실 수 있습니다. + +NPM 의 "foo" 패키지에 대응되는 자료형 패키지는 "@types/foo" 입니다. +원하시는 패키지를 찾을 수 없는 경우, [타입서치(TypeSearch)](https://microsoft.github.io/TypeSearch/) 사이트에서 한 번 찾아보세요. + +타입서치(TypeSearch)에서도 찾을 수 없는 경우, 찾고 있는 패키지가 자료형(Typing)을 +[함께 제공](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)하고 있지는 않은지 확인해보세요. +패키지에 포함된 자료형(Typing)은 주로 `package.json` 파일의 `"types"` 나 `"typings"` 필드(Field)를 통해 제공되지만, +`/// ` 같은 주석을 사용하여 패키지 안의 ".d.ts" 파일들을 직접 가져와야 할 수도 있습니다. + + +### 그 외의 방법들 + +타입스크립트(TypeScript) 1.0 버전에서 사용할 수 있는 방법은 다음과 같습니다. + +* [Typings](https://github.com/typings/typings) 을 사용하기 +* ~~[NuGet](http://nuget.org/packages?q=DefinitelyTyped) 을 사용하기~~ (다른 방법을 사용해주세요. NuGet 은 더 이상 DT 자료형(Typing)을 제공하지 않습니다.) +* 이 저장소의 `master` 브랜치를 직접 내려받기 + +위 방법을 사용할 경우 수동으로 [참조(Reference)](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html)를 추가해주어야 할 수 있습니다. + + +## 어떻게 이곳에 기여할 수 있나요? + +여러분과 같은 많은 기여자들의 도움 덕분에 이 저장소가 돌아가고 있습니다. 감사합니다. + +### 테스트 + +여러분이 만든 자료형 선언(Type declation)을 세상에 공유하기에 앞서, 여러분이 스스로 여러분의 자료형 선언(Type declation)을 사용하고 확인해주세요. + +#### 이미 존재하는 자료형 패키지를 임시로 수정하기 + +이미 존재하는 패키지의 자료형 선언(Type declaration)에 새로운 기능을 추가하려면 [모듈 증강(module augmentation)](http://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)를 사용할 수 있습니다. +물론 `node_modules/@types/foo/index.d.ts` 를 직접 수정하실 수도 있으며, 이 파일을 복사한 다음 아래의 과정을 따라하실 수도 있습니다. + + +#### 새 자료형 패키지를 임시로 추가하기 + +사용하고 계신 `tsconfig.json` 에 다음 내용을 추가해주세요. + +```json +"baseUrl": "types", +"typeRoots": ["types"], +``` + +(`types` 대신 `src/types` 을 사용하실 수도 있습니다.) +그리고 "foo" 모듈(Module)에 대한 선언(Declaration)을 포함하는 `types/foo/index.d.ts` 파일을 만들어주세요. +이제 코드 안에서 여러분의 새 자료형 선언(Type declaration)을 사용하는 `"foo"` 모듈(Module)을 임포트(Import)하실 수 있을 겁니다. +코드를 컴파일하고 실행시켜서 여러분의 자료형(Typing)이 실행 중에 실제로 벌어지는 일과 잘 맞아떨어지는지 확인해주세요. +실제 코드를 통한 확인이 끝나면, [풀 리퀘스트(Pull request)](#풀-리퀘스트pull-request-만들기)를 만들어주세요. +[이미 존재하는 패키지를 수정](#이미-존재하는-패키지를-수정하기)하거나 [새 패키지를 만들기](#새-패키지-만들기)위한 과정들을 따라하시면 됩니다. + + +### 풀 리퀘스트(Pull request) 만들기 + +여러분의 자료형 선언이 잘 작동하는지 확인하셨다면, DefinitelyTyped 에 공유해주세요. + +우선, 이 저장소를 [포크(fork)](https://guides.github.com/activities/forking/)해 주시고, [node](https://nodejs.org/) 를 설치하신 뒤, `npm install` 명령을 실행해주세요. + + +#### 이미 존재하는 패키지를 수정하기 + +* `cd types/my-package-to-edit` 명령을 실행합니다. +* 자료형(Typing) 파일들을 수정합니다. 테스트를 추가하는 것도 잊지마세요! + 만약 브레이킹 체인지(Breaking change)를 만드셨다면, [메이저 버전(major version)](#i-want-to-update-a-package-to-a-new-major-version)을 꼭 올려주세요. +* 패키지 머릿주석의 "Definitions by" 부분에 여러분의 이름을 추가하실 수도 있습니다. + - 이름을 추가하시면 다른 사람들이 그 패키지에 대한 풀 리퀘스트(Pull request)나 이슈(Issue)를 만들 때 여러분에게 알람이 갑니다. + - `// Definitions by: Alice , Bob ` 와 같이 여러분의 이름을 줄의 맨 마지막에 추가할 수 있습니다. + - 사람이 너무 많을 경우엔, 다음과 같이 여러 줄로 쓰실 수도 있습니다. + ```typescript + // Definitions by: Alice + // Bob + // Steve + // John + ``` +* `tslint.json` 파일이 있는 경우에는, `npm run lint package-name` 명령을 실행시키고 결과를 확인해주세요. 그렇지 않은 경우에는, 해당 패키지가 있는 디렉토리 안에서 `tsc` 명령을 실행시키고 결과를 확인해주세요. + +이미 존재하는 패키지에 대한 풀 리퀘스트(Pull request)를 만들었을 경우에는, `dt-bot` 이 이전 저자들을 자동으로 호출하는지 확인해주세요. +그렇지 않은 경우에는, 여러분이 직접 풀 리퀘스트(Pull request)와 관계있는 사람들을 호출할 수도 있습니다. + + +#### 새 패키지를 만들기 + +만약 라이브러리를 만드는 중이고 라이브러리가 타입스크립트(TypeScript)로 쓰여있다면, DefinitelyTyped 에 선언(Declaration)을 올리는 대신 패키지에 [자동생성된 선언(Declaration) 파일을 포함](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)시킬 수 있습니다. + +NPM 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 패키지의 이름과 같은 이름의 디렉토리를 만들어주세요. +NPM 에 올라가 있지 않은 패키지를 위한 자료형(Typing) 패키지를 만드시려면, 그 패키지가 NPM 에 올라와 있는 패키지와 이름이 겹치지 않는지 확인해주세요. +(`npm info foo` 명령어를 사용하여 `foo` 패키지가 NPM 에 있는지 확인할 수 있습니다.) + +새 자료형 패키지는 다음과 같은 구조로 구성되어있어야만 합니다. + +| 파일 이름 | 용도 | +| --- | --- | +| index.d.ts | 패키지를 위한 자료형(Typing)을 포함하는 파일입니다. | +| foo-tests.ts | 자료형(Typing)의 테스트를 위한 파일입니다. 이 파일의 코드는 실행되지는 않지만, 자료형 검사(Type checking)를 통과해야 합니다. | +| tsconfig.json | `tsc` 명령을 돌릴 수 있게 해주는 파일입니다. | +| tslint.json | 린터(Linter)를 사용할 수 있게 해주는 파일입니다. | + +이 파일들은, npm ≥ 5.2.0 에서는 `npx dts-gen --dt --name my-package-name --template module` 명령으로, +그 이하 경우에는 `npm install -g dts-gen` 와 `dts-gen --dt --name my-package-name --template module` 명령으로 만들 수 있습니다. +`dts-gen` 의 모든 옵션(Option)을 보고싶으시면 [dts-gen](https://github.com/Microsoft/dts-gen) 저장소를 확인해주세요. + +자료형(Typing) 패키지에 새 파일을 추가하거나, `async` 키워드를 사용하기 위해 `"target"` 을 `"es6"` 로 설정하거나, `"lib"` 를 추가하거나, `jsx` 지원을 추가하기 위해서 `tsconfig.json` 파일을 변경해야 할 수도 있습니다. + +DefinitelyTyped 의 관리자들이 주기적으로 새로운 풀 리퀘스트(Pull request)들을 확인하기는 하지만, +다른 풀 리퀘스트(Pull request)가 많을 경우 확인이 느려질 수 있다는 걸 알아주세요. + +[base64-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/base64-js) 패키지는 좋은 예시 중 하나입니다. + + +#### 많이 저지르는 실수들 + +* 우선, [안내서(Handbook)](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html)에 나와있는 내용들을 따라주세요. +* 코드에서는 모든 곳에서 탭(Tab)을 사용하거나, 항상 4 개의 띄어쓰기를 사용해주세요. +* `function sum(nums: number[]): number`의 경우, 만약 함수가 인자를 변경하지 않는다면 `ReadonlyArray` 를 사용해주세요. +* `interface Foo { new(): Foo; }`의 경우, + 이런 선언은 이 형(Type)을 가진 객체(Object)에 `new` 를 사용할 수 있도록 만듭니다. 많은 경우 여러분은 `declare class Foo { constructor(); }` 를 사용하려는 것일 겁니다. +* `const Class: { new(): IClass; }`의 경우, + `new` 를 사용할 수 있는 상수를 만드는 대신, `class Class { constructor(); }` 와 같이 클래스 선언(Class declaration)을 사용하는 게 더 좋습니다. +* `getMeAT(): T`의 경우, + 만일 자료형 매개변수(Type parameter)가 함수의 매개변수에 등장하지 않는다면, 그런 제너릭(Generic) 함수를 사용할 필요가 없습니다. + 그 제너릭(Generic) 함수는 단순히 자료형 단언(Type assertion)을 위장시킨 것뿐입니다. 이 경우 `getMeAT() as number` 와 같이 진짜 자료형 단언(Type assertion) 을 사용하는 게 더 좋습니다. + 다음은 괜찮은 제너릭(Generic)의 예시입니다. `function id(value: T): T;`. + 다음은 문제가 있는 제너릭(Generic)의 예시입니다. `function parseJson(json: string): T;`. + 예외적으로, `new Map()` 와 같은 경우는 괜찮습니다. +* `Function` 이나 `Object` 와 같은 형(Type)을 사용하는 것은 대부분의 경우 문제를 일으킵니다. 99% 의 경우 더 구체적인 형(Type)을 사용하는게 가능합니다. [함수(Function)](http://www.typescriptlang.org/docs/handbook/functions.html#function-types) 를 위해서는 `(x: number) => number` 와 같은, 객체를 위해서는 `{ x: number, y: number }` 와 같은 형(Type)들을 사용할 수 있습니다. 형(Type)에 대한 정보가 전혀 없을 경우에는, `Object` 형(Type)이 아니라 [`any`](http://www.typescriptlang.org/docs/handbook/basic-types.html#any) 형(Type)을 사용해야 합니다. 만일 어떤 형(Type)이 객체라는 사실만 알고 있는 경우, `Object` 나 `{ [key: string]: any }` 가 아니라 [`object`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#object-type) 를 사용해주세요. +* `var foo: string | any`의 경우, + `any` 가 합 자료형(Union type)의 안에서 사용될 경우, 결과 형(Type)은 언제나 `any` 가 됩니다. 따라서 형(Type)의 `string` 부분이 유용해 보인다 하더라도, 사실은 자료형 검사(Type checking)의 측면에서 `any` 와 다른 것이 없습니다. + 대신, `any`, `string`, 나 `string | object` 중 하나를 필요에 맞게 골라서 사용해주세요. + + +#### 패키지 삭제하기 + +패키지가 스스로의 형(Type)을 [포함](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)하게 되면, DefinitelyTyped 에 있는 자료형(Typing) 패키지를 삭제하는 것이 좋습니다. + +`npm run not-needed -- typingsPackageName asOfVersion sourceRepoURL [libraryName]` 명령어를 사용하여 자료형(Typing) 패키지를 삭제할 수 있습니다. +- `typingsPackageName` 는 삭제할 디렉토리의 이름입니다. +- `asOfVersion` 는 새 스텁(Stub) 용 `@types/foo` 를 퍼블리시(Publish)할 버전입니다. 이 버전은 현재 NPM 에 올라간 버전보다 더 높은 버전이어야 합니다. +- `sourceRepoURL` 는 자료형(Typing)을 포함하게 된 저장소의 주소입니다. +- `libraryName` 는 패키지의 이름을 읽기 쉽게 쓴 것입니다. 즉, "angular2" 대신에 "Angular 2" 와 같이 쓰는 것이 좋습니다. (생략했을 경우에는 "typingsPackageName" 와 같은 것으로 취급됩니다.) + +DefinitelyTyped 의 다른 패키지들이 삭제된 자료형(Typing) 패키지를 사용하고 있을 경우, 형(Type)을 포함하기 시작한 원래 패키지를 사용하도록 수정해야합니다. 삭제된 자료형(Typing) 패키지를 사용하는 각 DefinitelyTyped 패키지들의 `package.json` 파일에 `"dependencies": { "foo": "x.y.z" }` 를 추가해주시면 됩니다. + +DefinitelyTyped 에 한 번도 올라온 적 없는 패키지가 형(Type)을 포함하게 되었다면, `notNeededPackages.json` 파일에 추가할 필요도 없습니다. + + +#### 린트(Lint)하기 + +자료형(Typing) 패키지를 린트(Lint)하려면, 패키지 디렉토리에 `{ "extends": "dtslint/dt.json" }` 를 포함하고 있는 `tslint.json` 파일을 추가해주시면 됩니다. 모든 새 패키지는 해당 파일을 가지고 있어야 합니다. +고쳐야 하지만 아직 고쳐지지 않은 린트(Lint) 결과가 있을 때에만 `tslint.json` 에서 린트 규칙(Lint rule)을 사용하지 않도록 설정할 수 있습니다. 예를 들어, + +```js +{ + "extends": "dtslint/dt.json", + "rules": { + // 이 패키지는 Function 형을 사용하고 있으며, 고치는 게 쉽지 않다. + "ban-types": false + } +} +``` + +(린트 규칙(Lint rule)이 절대로 적용되서는 안되는 경우에는, `// tslint:disable rule-name` 나 `//tslint:disable-next-line rule-name` 를 사용하는 것이 좋습니다. 후자가 더 나은 방식입니다.) + +어떤 표현식(Expression)이 특정한 형(Type)을 가진다고 단언(Assert)하고 싶을 때에는 `$ExpectType` 를 사용하시면 됩니다. 어떤 표현식(Expression)이 컴파일에 실패해야하는 경우에는 `$ExpectError` 를 하시면 됩니다. + +```js +// $ExpectType void +f(1); + +// $ExpectError +f("one"); +``` + +[dtslint](https://github.com/Microsoft/dtslint#write-tests) 저장소의 README 파일에서 더 자세한 내용을 확인하실 수 있습니다. + +이런 테스트들은 `npm run lint package-name` 명령으로 실행해볼 수 있습니다. 이 때, `package-name` 은 테스트하고 싶은 패키지의 이름입니다. +테스트 스크립트는 [dtslint](https://github.com/Microsoft/dtslint) 를 사용하고 있습니다. + + +## 자주 하는 질문들 + +#### 이 저장소와 `@types` 패키지들이 대체 무슨 관계가 있는 건가요? + +`master` 브랜치(Branch)의 내용들이 [types-publisher](https://github.com/Microsoft/types-publisher) 를 사용해 자동으로 `@types` 퍼블리시(Publish)됩니다. + +#### 풀 리퀘스트(Pull request)를 제출했습니다. 이게 합쳐질 때까지 얼마나 걸리나요? + +상황에 따라 다르지만, 대부분의 풀 리퀘스트(Pull request)들은 일주일 안에 합쳐집니다. 머릿주석에 있는 저자 중 한명에 의해 승인된 풀 리퀘스트(Pull request)는 보통 더 빨리 합쳐집니다. 새로운 패키지에 대한 풀 리퀘스트(Pull request)는 관리자의 세세한 코드 리뷰를 필요로 하기 때문에 더 오래 걸리는 경우가 많습니다. 각 PR 들은 합쳐지기 전에 TypeScript or DefinitelyTyped 팀 구성원의 코드 리뷰를 받아야 하며, 이는 사람이 하는 일이기 때문에 느려질 수도 있으니 양해를 바랍니다. [풀 리퀘스트 번다운 보드(PR Burndown Board)](https://github.com/DefinitelyTyped/DefinitelyTyped/projects/3?card_filter_query=is%3Aopen)에서 열린 풀 리퀘스트에 대한 관리자들의 진행도를 확인하실 수 있습니다. + +#### 내 풀 리퀘스트(Pull request)는 합쳐졌습니다. 언제 NPM 에 `@types` 패키지가 갱신되나요? + +NPM 의 패키지들은 수시간 안에 갱신될 겁니다. 만약 24 시간이 지나도 갱신되지 않으면, 문제를 파악하기 위해 @RyanCavanaugh 나 @andy-ms 를 풀 리퀘스트(Pull request)에서 호출해주세요. + +#### 다른 자료형 정의(Type definition)에 의존하는 자료형 정의(Type definition)을 만들고 있습니다. `` 와 임포트(import) 중 무엇을 사용해야하나요? + +외부 모듈(`export` 를 사용하는 모듈)을 사용할 경우, 임포트(import)를 사용해주세요. +환경과 관련된 모듈(ambient module)(`declare module` 를 쓰거나 전역 변수들을 선언한 모듈)을 사용할 경우, `` 를 사용해주세요. + +#### `package.json` 파일이 가끔 보이던데? + +일반적으로는 `package.json` 파일을 사용할 필요가 없습니다. 패키지가 퍼블리시(Publish)될 때 패키지를 위한 `package.json` 파일은 자동으로 생성됩니다. +가끔 보이는 `package.json` 파일은 의존하는 것들을 표시하기 위해 사용됩니다. [예시](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/pikaday/package.json)를 한 번 보세요. +의존성을 제외한 다른 필드(Field)들, 그러니까 `"description"` 같은 것들은 사용해서는 안됩니다. +옛날 `@types` 패키지를 사용하고 싶으실 경우에도 `"dependencies": { "@types/foo": "x.y.z" }` 와 같은 내용을 `package.json` 파일에 넣으셔야 합니다. + +#### 어떤 패키지들에 `tslint.json` 이 없거나, `tsconfig.json` 에 `"noImplicitAny": true`, `"noImplicitThis": true`, 나 `"strictNullChecks": true` 가 없어요. + +그럼 그 패키지들이 잘못된 겁니다. 고쳐서 풀 리퀘스트(Pull request)를 제출해주시면 고맙겠습니다. + +#### 자료형 정의(Type definition)을 요청할 수 있나요? + +이미 요청된 자료형 정의(Type definition)들을 [여기서](https://github.com/DefinitelyTyped/DefinitelyTyped/labels/Definition%3ARequest) 보실 수 있습니다. + +#### DOM 을 위한 자료형 정의(Type definitions)는요? + +웹 표준(Web standard)과 관련이 있는 자료형(Typing)들은 [TSJS-lib-generator](https://github.com/Microsoft/TSJS-lib-generator) 저장소에 기여해서 고치실 수 있습니다. 고쳐진 자료형(Typing)은 `lib.dom.d.ts` 파일에 포함될 겁니다. + +#### 어떤 패키지가 `export =` 를 쓰고 있는데, 저는 디폴트 임포트(Default import)가 더 좋습니다. `export =` 를 `export default` 로 바꿔도 되나요? + +타입스크립트(TypeScript) 2.7 이상을 사용하고 계시면 프로젝트 안에서 `--esModuleInterop` 를 사용해주세요. +그 이하의 경우, 디폴트 임포트(Default import)가 동작하는 환경(Webpack, SystemJS, esm)에서 작업 중이시면 [`--allowSyntheticDefaultImports`](http://www.typescriptlang.org/docs/handbook/compiler-options.html) 를 사용하는 걸 고려해보세요. +자료형 정의(Type definition)가 맞는 경우에는 자료형 정의(Type definition)을 수정하지 마세요. +NPM 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 `export =` 이 맞고, `node -p 'require("foo").default'` 이 원하는 값이라면 `export default` 이 맞습니다. + +#### 자료형 선언(Type declaration)에서 타입스크립트(TypeScript) 2.1 이상의 기능을 사용하고 싶습니다. + +정의(Definition) 머릿주석(`// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`) 뒤에 `// TypeScript Version: 2.1` 를 추가해주시면 됩니다. + +#### 타입스크립트(TypeScript)에 기본으로 포함되지 않은 DOM API 를 추가하고 싶어요. + +[TSJS-Lib-Generator](https://github.com/Microsoft/TSJS-lib-generator#readme) 저장소가 관련되어있을 가능성이 있습니다. 해당 저장소의 안내를 따라주세요. +해당 표준이 아직 초안인 상태라면, 이 저장소와 관련된 일입니다. +`dom-` 으로 시작하는 패키지를 만드신 뒤, "Project" 머릿주석 부분에 해당 표준의 링크를 써 주세요. +다만 표준이 초안을 벗어나면 DefinitelyTyped 에서 삭제되고 `@types` 패키지가 지원이 중단된(Deprecated) 것으로 표시될 수도 있습니다. + +#### 패키지를 새 메이저 버전(major version)에 맞게 갱신하고 싶어요. + +옛날 버전도 계속해서 수정할 예정이라면, 이전 버전에 해당하는 새 디렉토리(예를 들어 `2.` 버전을 위해서는 `v2`)를 만들고 현재 파일들을 그 디렉토리로 옮겨야 합니다. 새 디렉토리로 옮긴 뒤에는 + +1. `tsconfig.json` 와 `tslint.json` 에 포함된 상대경로들을 수정해주어야 합니다. +2. 경로 대응 규칙(Path mapping rule)을 추가하여 테스트가 올바른 버전을 검사하도록 해야합니다. + +예를 들어, [history 패키지의 2 버전의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/history/v2/tsconfig.json) 파일은 다음과 같이 생겼습니다. + +```json +{ + "compilerOptions": { + "baseUrl": "../../", + "typeRoots": ["../../"], + "paths": { + "history": [ "history/v2" ] + }, + }, + "files": [ + "index.d.ts", + "history-tests.ts" + ] +} +``` + +수정 중인 패키지에 의존하는 DefinitelyTyped 의 다른 패키지들이 새 버전과 호환되지 않을 경우, 그 패키지들에도 옛날 버전으로의 경로 대응 규칙(Path mapping rule)을 추가해주어야 합니다. 수정 중인 패키지에 의존하는 패키지에 의존하는 패키지들에도 똑같은 작업을 해 주셔야 합니다. + +예를 들어, `react-router` 패키지는 `history@2` 패키지에 의존하고 있기 때문에, [react-router 패키지의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) 파일이 `"history": [ "history/v2" ]` 와 같은 경로 대응 규칙(Path mapping rule)을 가지고 있는 걸 볼 수 있습니다. +이어서 (`react-router` 패키지에 의존하는 패키지인) `react-router-bootstrap` 또한 [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json) 파일 안에 경로 대응 규칙(Path mapping rule)을 가지고 있는 것을 보실 수 있습니다. + +`/// ` 에서는 경로 대응 규칙(Path mapping rule)이 동작하지 않기 때문에, DefinitelyTyped 패키지로에 의존할 때에는 임포트(import) 를 사용해야 합니다. + +#### 전역적으로도 모듈로도 사용될 수 있는 패키지의 자료형 선언(Type declaration)은 어떻게 쓰나요? + +타입스크립트 안내서(TypeScript Handbook)은 [선언(Declaration)을 쓰는 방법에 대한 전반적인 정보](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)와 [예시들](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html)을 포함하고 있습니다. 이 내용에는 ES6 식의 모듈 문법을 사용할 수 있는 자료형 선언(Type declaration)을 만드는 방법과 객체를 전역에서 사용할 수 있도록 하는 방법이 포함되어 있습니다. [big.js 패키지의 자료형 선언(Type declaration)](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/big.js/index.d.ts)이 실례입니다. 이 패키지는 웹 페이지의 스크립트 태그를 사용해 불러올 수 있으며, 또한 ES6 식의 임포트(Import) 구문을 사용해서 불러올 수도 있습니다. + +여러분의 패키지가 임포트(Import) 구문을 사용했을 때와 전역적으로 불렀을 때를 테스트 해보고 싶다면, `test` 디렉토리를 추가하고 `YourLibraryName-global.test.ts` 그리고 `YourLibraryName-module.test.ts` 라는 이름으로 테스트 파일 두 개를 추가해주세요. **전역(Global)** 테스트 파일은 웹 페이지에서 전역적으로 사용될 때를 테스트하는 파일입니다. 이 파일에서는 임포트(Import) 구문을 사용하지 않아야 합니다. **모듈(Module)** 테스트 파일은 임포트(Import) 구문을 사용할 때를 테스트 하는 파일입니다. 만약 여러분의 `tsconfig.json` 파일이 `files` 필드(Field)를 가지고 있다면, 이 필드(Field)는 반드시 두 테스트 파일을 모두 포함해야 합니다. [이 방식을 사용하는 실례](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/big.js/test) 또한 big.js 패키지의 자료형 선언(Type declaration)에서 확인해보실 수 있습니다. + +각각의 테스트 파일에 모든 상황을 테스트할 필요는 없다는 걸 잊지마세요. 전역 테스트 파일에서는 전역적으로 사용될 때만 테스트하고, 모듈 테스트 파일에서 나머지 상황들을 모두 테스트 할 수 있으며, 그 반대의 경우도 괜찮습니다. + +#### 지역 패키지(Scoped package)의 경우는 어떻게 하죠? + +`@foo/bar` 패키지와 같은 지역 패키지(Scoped package)를 위한 자료형 패키지(Type package)는 `types/foo__bar` 디렉토리에 추가하면 됩니다. 밑줄 문자가 두 번 있는 것에 주의하세요. + +지역 패키지(Scoped package)를 위한 자료형 패키지(Type package)를 생성하기 위해 `dts-gen` 를 사용한 경우에는, +다음과 같이 생성된 `tsconfig.json` 안에 지역 패키지(Scoped package)를 위한 적절한 경로 대응 규칙(Path mapping rule)을 추가해주어야 합니다. + +```json +{ + "paths":{ + "@foo/bar": ["foo__bar"] + } +} +``` + + +#### 깃헙(GitHub)이 보여주는 파일 히스토리(History)가 불완전해요. + +깃헙은 이름이 바뀐 파일의 히스토리(History)를 [지원하지 않습니다](http://stackoverflow.com/questions/5646174/how-to-make-github-follow-directory-history-after-renames). 대신 [`git log --follow`](https://www.git-scm.com/docs/git-log) 명령을 사용하세요. + +#### ES6 에서 사용하는 임포트(Import)를 사용하기 위해 모듈을 익스포트(Export)하지 않는 패키지들에 빈 이름공간을 추가해야 하나요? + +[chai-http](https://github.com/chaijs/chai-http) 패키지와 같은 몇몇 패키지들은 함수를 익스포트(Export)합니다. + +이런 패키지들을 `import * as foo from "foo";` 와 같이 임포트(Import)하면 다음과 같은 오류가 발생합니다. + +> error TS2497: Module 'foo' resolves to a non-module entity and cannot be imported using this construct + +이 오류는 함수의 이름과 똑같은 빈 이름공간(Namespace)을 정의해서 없앨 수 있으나, 좋은 방법은 아닙니다. +[스택오버플로(Stack Overflow)의 이 질문의 답변](https://stackoverflow.com/questions/39415661/what-does-resolves-to-a-non-module-entity-and-cannot-be-imported-using-this)이 이 문제와 관련되어 자주 언급됩니다. + +`import foo = require("foo");` 를 사용하여 모듈을 임포트(Import)하거나, 환경에서 ES6 모듈 변환(Module interop)을 지원한다면 `--allowSyntheticDefaultImports` 와 함께 `import foo from "foo";` 같은 디폴트 임포트(Default import)를 사용하는 것이 더 나은 방법입니다. + +## 라이센스 + +이 프로젝트는 MIT license 가 적용되어 있습니다. + +각 자료형 정의(Type definition) 파일들의 저작권은 각 기여자들에게 있으며, 기여자들은 해당 자료형 정의(Type definition) 파일들의 맨 위에 나열되어 있습니다. + +[![Analytics](https://ga-beacon.appspot.com/UA-47495295-4/borisyankov/DefinitelyTyped)](https://github.com/igrigorik/ga-beacon) diff --git a/README.md b/README.md index 34eae06069..2d3cfc4a64 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Also see the [definitelytyped.org](http://definitelytyped.org) website, although information in this README is more up-to-date. -*[You can also read this README in Spanish!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md)* +*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [Korean!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.kr.md)* ## What are declaration files? From f9dcdecd8b24587009fb01962b2eb867e7779abc Mon Sep 17 00:00:00 2001 From: "Eugene Y. Q. Shen" Date: Mon, 6 Aug 2018 09:28:50 -0700 Subject: [PATCH 10/49] [node]: Update assert.fail parameters (#27622) [assert.fail](https://nodejs.org/api/assert.html#assert_assert_fail_message) has an optional `message` parameter that can be either a `string` or `Error`. --- types/node/index.d.ts | 59 ++++++++++++------------ types/node/v0/index.d.ts | 90 +++++++++++++++++-------------------- types/node/v0/node-tests.ts | 58 ++++++++++++------------ types/node/v4/index.d.ts | 19 ++++---- types/node/v6/index.d.ts | 16 +++---- types/node/v6/node-tests.ts | 34 +++++++------- types/node/v7/index.d.ts | 16 +++---- types/node/v7/node-tests.ts | 16 +++---- types/node/v8/index.d.ts | 18 +++----- types/node/v9/index.d.ts | 41 ++++++++--------- 10 files changed, 170 insertions(+), 197 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index f39dc1dc74..49fd7364e3 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -26,6 +26,7 @@ // Lishude // Andrew Makarov // Zane Hannan AU +// Eugene Y. Q. Shen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** inspector module types */ @@ -6381,7 +6382,7 @@ declare module "util" { } declare module "assert" { - function internal(value: any, message?: string): void; + function internal(value: any, message?: string | Error): void; namespace internal { export class AssertionError implements Error { name: string; @@ -6390,46 +6391,42 @@ declare module "assert" { expected: any; operator: string; generatedMessage: boolean; + code: 'ERR_ASSERTION'; constructor(options?: { message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function + operator?: string; stackStartFn?: Function }); } - export function fail(message: string): never; - /** @deprecated since v10.0.0 */ - export function fail(actual: any, expected: any, message?: string, operator?: string): never; - export function ok(value: any, message?: string): void; - /** @deprecated use strictEqual() */ - export function equal(actual: any, expected: any, message?: string): void; - /** @deprecated use notStrictEqual() */ - export function notEqual(actual: any, expected: any, message?: string): void; - /** @deprecated use deepStrictEqual() */ - export function deepEqual(actual: any, expected: any, message?: string): void; - /** @deprecated use notDeepStrictEqual() */ - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function deepStrictEqual(actual: any, expected: any, message?: string): void; - export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; + export function fail(message?: string | Error): never; + /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ + export function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; + export function ok(value: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use strictEqual() instead. */ + export function equal(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ + export function notEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ + export function deepEqual(actual: any, expected: any, message?: string | Error): void; + /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ + export function notDeepEqual(actual: any, expected: any, message?: string | Error): void; + export function strictEqual(actual: any, expected: any, message?: string | Error): void; + export function notStrictEqual(actual: any, expected: any, message?: string | Error): void; + export function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; - export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - - export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function throws(block: Function, message?: string | Error): void; + export function throws(block: Function, error: RegExp | Function | Object | Error, message?: string | Error): void; + export function doesNotThrow(block: Function, message?: string | Error): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string | Error): void; export function ifError(value: any): void; - export function rejects(block: Function | Promise, message?: string): Promise; - export function rejects(block: Function | Promise, error: Function | RegExp | Object | Error, message?: string): Promise; - export function doesNotReject(block: Function | Promise, message?: string): Promise; - export function doesNotReject(block: Function | Promise, error: Function | RegExp | Object | Error, message?: string): Promise; + export function rejects(block: Function | Promise, message?: string | Error): Promise; + export function rejects(block: Function | Promise, error: RegExp | Function | Object | Error, message?: string | Error): Promise; + export function doesNotReject(block: Function | Promise, message?: string | Error): Promise; + export function doesNotReject(block: Function | Promise, error: RegExp | Function, message?: string | Error): Promise; export var strict: typeof internal; } diff --git a/types/node/v0/index.d.ts b/types/node/v0/index.d.ts index dce2a1a54d..3bc1b3ed5d 100644 --- a/types/node/v0/index.d.ts +++ b/types/node/v0/index.d.ts @@ -573,42 +573,42 @@ declare module "http" { */ export interface ClientResponse extends IncomingMessage { } - export interface AgentOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number; - } + export interface AgentOptions { + /** + * Keep sockets around in a pool to be used by other requests in the future. Default = false + */ + keepAlive?: boolean; + /** + * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. + * Only relevant if keepAlive is set to true. + */ + keepAliveMsecs?: number; + /** + * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity + */ + maxSockets?: number; + /** + * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. + */ + maxFreeSockets?: number; + } export class Agent { - maxFreeSockets: number; - maxSockets: number; - sockets: any; - requests: any; + maxFreeSockets: number; + maxSockets: number; + sockets: any; + requests: any; - constructor(opts?: AgentOptions); + constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, - * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, - * sockets may hang open for quite a long time before the server terminates them. - */ - destroy(): void; - } + /** + * Destroy any sockets that are currently in use by the agent. + * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, + * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, + * sockets may hang open for quite a long time before the server terminates them. + */ + destroy(): void; + } export var METHODS: string[]; @@ -1858,7 +1858,7 @@ declare module "util" { } declare module "assert" { - function internal (value: any, message?: string): void; + function internal(value: any, message?: string): void; namespace internal { export class AssertionError implements Error { name: string; @@ -1868,8 +1868,10 @@ declare module "assert" { operator: string; generatedMessage: boolean; - constructor(options?: {message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function}); + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFn?: Function + }); } export function fail(actual?: any, expected?: any, message?: string, operator?: string): never; @@ -1877,22 +1879,14 @@ declare module "assert" { export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function notDeepEqual(actual: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; - export var throws: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; - export var doesNotThrow: { - (block: Function, message?: string): void; - (block: Function, error: Function, message?: string): void; - (block: Function, error: RegExp, message?: string): void; - (block: Function, error: (err: any) => boolean, message?: string): void; - }; + export function throws(block: Function, message?: string): void; + export function throws(block: Function, error: RegExp | Function, message?: string): void; + export function doesNotThrow(block: Function, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string): void; export function ifError(value: any): void; } diff --git a/types/node/v0/node-tests.ts b/types/node/v0/node-tests.ts index d8e0a40699..37ef4f9e81 100644 --- a/types/node/v0/node-tests.ts +++ b/types/node/v0/node-tests.ts @@ -179,37 +179,37 @@ function stream_readable_pipe_test() { var hmacResult: string = crypto.createHmac('md5', 'hello').update('world').digest('hex'); function crypto_cipher_decipher_string_test() { - var key:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7]); - var clearText:string = "This is the clear text."; - var cipher:crypto.Cipher = crypto.createCipher("aes-128-ecb", key); - var cipherText:string = cipher.update(clearText, "utf8", "hex"); - cipherText += cipher.final("hex"); + var key:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7]); + var clearText:string = "This is the clear text."; + var cipher:crypto.Cipher = crypto.createCipher("aes-128-ecb", key); + var cipherText:string = cipher.update(clearText, "utf8", "hex"); + cipherText += cipher.final("hex"); - var decipher:crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); - var clearText2:string = decipher.update(cipherText, "hex", "utf8"); - clearText2 += decipher.final("utf8"); + var decipher:crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); + var clearText2:string = decipher.update(cipherText, "hex", "utf8"); + clearText2 += decipher.final("utf8"); - assert.equal(clearText2, clearText); + assert.equal(clearText2, clearText); } function crypto_cipher_decipher_buffer_test() { - var key:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7]); - var clearText:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4]); - var cipher:crypto.Cipher = crypto.createCipher("aes-128-ecb", key); - var cipherBuffers:Buffer[] = []; - cipherBuffers.push(cipher.update(clearText)); - cipherBuffers.push(cipher.final()); + var key:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7]); + var clearText:Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4]); + var cipher:crypto.Cipher = crypto.createCipher("aes-128-ecb", key); + var cipherBuffers:Buffer[] = []; + cipherBuffers.push(cipher.update(clearText)); + cipherBuffers.push(cipher.final()); - var cipherText:Buffer = Buffer.concat(cipherBuffers); + var cipherText:Buffer = Buffer.concat(cipherBuffers); - var decipher:crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); - var decipherBuffers:Buffer[] = []; - decipherBuffers.push(decipher.update(cipherText)); - decipherBuffers.push(decipher.final()); + var decipher:crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); + var decipherBuffers:Buffer[] = []; + decipherBuffers.push(decipher.update(cipherText)); + decipherBuffers.push(decipher.final()); - var clearText2:Buffer = Buffer.concat(decipherBuffers); + var clearText2:Buffer = Buffer.concat(decipherBuffers); - assert.deepEqual(clearText2, clearText); + assert.deepEqual(clearText2, clearText); } //////////////////////////////////////////////////// @@ -242,14 +242,14 @@ namespace http_tests { var codeMessage = http.STATUS_CODES['400']; var codeMessage = http.STATUS_CODES[400]; - var agent: http.Agent = new http.Agent({ - keepAlive: true, - keepAliveMsecs: 10000, - maxSockets: Infinity, - maxFreeSockets: 256 - }); + var agent: http.Agent = new http.Agent({ + keepAlive: true, + keepAliveMsecs: 10000, + maxSockets: Infinity, + maxFreeSockets: 256 + }); - var agent: http.Agent = http.globalAgent; + var agent: http.Agent = http.globalAgent; http.request('http://www.example.com/xyz'); } diff --git a/types/node/v4/index.d.ts b/types/node/v4/index.d.ts index bdce459efe..a53098f615 100644 --- a/types/node/v4/index.d.ts +++ b/types/node/v4/index.d.ts @@ -2440,7 +2440,7 @@ declare module "util" { } declare module "assert" { - function internal (value: any, message?: string): void; + function internal(value: any, message?: string): void; namespace internal { export class AssertionError implements Error { name: string; @@ -2450,8 +2450,10 @@ declare module "assert" { operator: string; generatedMessage: boolean; - constructor(options?: {message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function}); + constructor(options?: { + message?: string; actual?: any; expected?: any; + operator?: string; stackStartFn?: Function + }); } export function fail(actual: any, expected: any, message?: string, operator?: string): never; @@ -2459,21 +2461,16 @@ declare module "assert" { export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function notDeepEqual(actual: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; export function deepStrictEqual(actual: any, expected: any, message?: string): void; export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - + export function throws(block: Function, error: RegExp | Function, message?: string): void; export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string): void; export function ifError(value: any): void; } diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index de1b280260..44083060ee 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -3944,30 +3944,26 @@ declare module "assert" { constructor(options?: { message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function + operator?: string; stackStartFn?: Function }); } - export function fail(actual: any, expected: any, message?: string, operator?: string): never; + export function fail(message?: string): never; + export function fail(actual: any, expected: any, message?: string, operator?: string, stackStartFn?: Function): never; export function ok(value: any, message?: string): void; export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function notDeepEqual(actual: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; export function deepStrictEqual(actual: any, expected: any, message?: string): void; export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - + export function throws(block: Function, error: RegExp | Function, message?: string): void; export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string): void; export function ifError(value: any): void; } diff --git a/types/node/v6/node-tests.ts b/types/node/v6/node-tests.ts index 43441e9840..5ca32d660c 100644 --- a/types/node/v6/node-tests.ts +++ b/types/node/v6/node-tests.ts @@ -786,13 +786,13 @@ namespace crypto_tests { let clearText: string = "This is the clear text."; let cipher: crypto.Cipher = crypto.createCipher("aes-128-ecb", key); let cipherText: string = cipher.update(clearText, "utf8", "hex"); - cipherText += cipher.final("hex"); + cipherText += cipher.final("hex"); let decipher: crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); let clearText2: string = decipher.update(cipherText, "hex", "utf8"); - clearText2 += decipher.final("utf8"); + clearText2 += decipher.final("utf8"); - assert.equal(clearText2, clearText); + assert.equal(clearText2, clearText); } { @@ -801,19 +801,19 @@ namespace crypto_tests { let clearText: Buffer = new Buffer([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4]); let cipher: crypto.Cipher = crypto.createCipher("aes-128-ecb", key); let cipherBuffers: Buffer[] = []; - cipherBuffers.push(cipher.update(clearText)); - cipherBuffers.push(cipher.final()); + cipherBuffers.push(cipher.update(clearText)); + cipherBuffers.push(cipher.final()); let cipherText: Buffer = Buffer.concat(cipherBuffers); let decipher: crypto.Decipher = crypto.createDecipher("aes-128-ecb", key); let decipherBuffers: Buffer[] = []; - decipherBuffers.push(decipher.update(cipherText)); - decipherBuffers.push(decipher.final()); + decipherBuffers.push(decipher.update(cipherText)); + decipherBuffers.push(decipher.final()); let clearText2: Buffer = Buffer.concat(decipherBuffers); - assert.deepEqual(clearText2, clearText); + assert.deepEqual(clearText2, clearText); } { @@ -839,8 +839,8 @@ namespace tls_tests { var blah = ctx.context; var connOpts: tls.ConnectionOptions = { - host: "127.0.0.1", - port: 55 + host: "127.0.0.1", + port: 55 }; var tlsSocket = tls.connect(connOpts); } @@ -1043,14 +1043,14 @@ namespace http_tests { } { - var agent: http.Agent = new http.Agent({ - keepAlive: true, - keepAliveMsecs: 10000, - maxSockets: Infinity, - maxFreeSockets: 256 - }); + var agent: http.Agent = new http.Agent({ + keepAlive: true, + keepAliveMsecs: 10000, + maxSockets: Infinity, + maxFreeSockets: 256 + }); - var agent: http.Agent = http.globalAgent; + var agent: http.Agent = http.globalAgent; http.request({ agent: false }); http.request({ agent: agent }); diff --git a/types/node/v7/index.d.ts b/types/node/v7/index.d.ts index a40d713dcf..da7c47d68e 100644 --- a/types/node/v7/index.d.ts +++ b/types/node/v7/index.d.ts @@ -3988,30 +3988,26 @@ declare module "assert" { constructor(options?: { message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function + operator?: string; stackStartFn?: Function }); } - export function fail(actual: any, expected: any, message?: string, operator?: string): never; + export function fail(message?: string): never; + export function fail(actual: any, expected: any, message?: string, operator?: string, stackStartFn?: Function): never; export function ok(value: any, message?: string): void; export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function notDeepEqual(actual: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; export function deepStrictEqual(actual: any, expected: any, message?: string): void; export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - + export function throws(block: Function, error: RegExp | Function, message?: string): void; export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string): void; export function ifError(value: any): void; } diff --git a/types/node/v7/node-tests.ts b/types/node/v7/node-tests.ts index 4549ab7062..764dc6e8d0 100644 --- a/types/node/v7/node-tests.ts +++ b/types/node/v7/node-tests.ts @@ -1025,14 +1025,14 @@ namespace http_tests { } { - var agent: http.Agent = new http.Agent({ - keepAlive: true, - keepAliveMsecs: 10000, - maxSockets: Infinity, - maxFreeSockets: 256 - }); + var agent: http.Agent = new http.Agent({ + keepAlive: true, + keepAliveMsecs: 10000, + maxSockets: Infinity, + maxFreeSockets: 256 + }); - var agent: http.Agent = http.globalAgent; + var agent: http.Agent = http.globalAgent; http.request({ agent: false }); http.request({ agent: agent }); @@ -1056,7 +1056,7 @@ namespace http_tests { request.abort(); } - // http request options + // http request options { const requestOpts: http.RequestOptions = { timeout: 30000 diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index 8e6c649d00..06283dd1dd 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -5634,34 +5634,30 @@ declare module "assert" { expected: any; operator: string; generatedMessage: boolean; + code: 'ERR_ASSERTION'; constructor(options?: { message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function + operator?: string; stackStartFn?: Function }); } - export function fail(message: string): never; - export function fail(actual: any, expected: any, message?: string, operator?: string): never; + export function fail(message?: string): never; + export function fail(actual: any, expected: any, message?: string, operator?: string, stackStartFn?: Function): never; export function ok(value: any, message?: string): void; export function equal(actual: any, expected: any, message?: string): void; export function notEqual(actual: any, expected: any, message?: string): void; export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; + export function notDeepEqual(actual: any, expected: any, message?: string): void; export function strictEqual(actual: any, expected: any, message?: string): void; export function notStrictEqual(actual: any, expected: any, message?: string): void; export function deepStrictEqual(actual: any, expected: any, message?: string): void; export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - + export function throws(block: Function, error: RegExp | Function, message?: string): void; export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string): void; export function ifError(value: any): void; } diff --git a/types/node/v9/index.d.ts b/types/node/v9/index.d.ts index 19259316b8..aed5a0f9a0 100644 --- a/types/node/v9/index.d.ts +++ b/types/node/v9/index.d.ts @@ -25,6 +25,7 @@ // Alexander T. // Lishude // Andrew Makarov +// Eugene Y. Q. Shen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /** inspector module types */ @@ -5708,7 +5709,7 @@ declare module "util" { } declare module "assert" { - function internal(value: any, message?: string): void; + function internal(value: any, message?: string | Error): void; namespace internal { export class AssertionError implements Error { name: string; @@ -5717,34 +5718,30 @@ declare module "assert" { expected: any; operator: string; generatedMessage: boolean; + code: 'ERR_ASSERTION'; constructor(options?: { message?: string; actual?: any; expected?: any; - operator?: string; stackStartFunction?: Function + operator?: string; stackStartFn?: Function }); } - export function fail(message: string): never; - export function fail(actual: any, expected: any, message?: string, operator?: string): never; - export function ok(value: any, message?: string): void; - export function equal(actual: any, expected: any, message?: string): void; - export function notEqual(actual: any, expected: any, message?: string): void; - export function deepEqual(actual: any, expected: any, message?: string): void; - export function notDeepEqual(acutal: any, expected: any, message?: string): void; - export function strictEqual(actual: any, expected: any, message?: string): void; - export function notStrictEqual(actual: any, expected: any, message?: string): void; - export function deepStrictEqual(actual: any, expected: any, message?: string): void; - export function notDeepStrictEqual(actual: any, expected: any, message?: string): void; + export function fail(message?: string | Error): never; + export function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never; + export function ok(value: any, message?: string | Error): void; + export function equal(actual: any, expected: any, message?: string | Error): void; + export function notEqual(actual: any, expected: any, message?: string | Error): void; + export function deepEqual(actual: any, expected: any, message?: string | Error): void; + export function notDeepEqual(actual: any, expected: any, message?: string | Error): void; + export function strictEqual(actual: any, expected: any, message?: string | Error): void; + export function notStrictEqual(actual: any, expected: any, message?: string | Error): void; + export function deepStrictEqual(actual: any, expected: any, message?: string | Error): void; + export function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; - export function throws(block: Function, message?: string): void; - export function throws(block: Function, error: Function, message?: string): void; - export function throws(block: Function, error: RegExp, message?: string): void; - export function throws(block: Function, error: (err: any) => boolean, message?: string): void; - - export function doesNotThrow(block: Function, message?: string): void; - export function doesNotThrow(block: Function, error: Function, message?: string): void; - export function doesNotThrow(block: Function, error: RegExp, message?: string): void; - export function doesNotThrow(block: Function, error: (err: any) => boolean, message?: string): void; + export function throws(block: Function, message?: string | Error): void; + export function throws(block: Function, error: RegExp | Function, message?: string | Error): void; + export function doesNotThrow(block: Function, message?: string | Error): void; + export function doesNotThrow(block: Function, error: RegExp | Function, message?: string | Error): void; export function ifError(value: any): void; } From 44f4f58991eaaf96894aba0bc81238fb7ac6ecca Mon Sep 17 00:00:00 2001 From: Junyoung Clare Jang Date: Mon, 6 Aug 2018 12:39:22 -0400 Subject: [PATCH 11/49] Fix broken README link to korean README (#27903) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d3cfc4a64..9a31d73da1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Also see the [definitelytyped.org](http://definitelytyped.org) website, although information in this README is more up-to-date. -*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [Korean!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.kr.md)* +*You can also read this README in [Spanish](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.es.md) and [Korean!](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.ko.md)* ## What are declaration files? From ce3424af6499f0c590f5301a29951dfd71901a00 Mon Sep 17 00:00:00 2001 From: Jimmy Grand Date: Mon, 6 Aug 2018 18:53:12 +0200 Subject: [PATCH 12/49] mongoose: add context to the ModelFindByIdAndUpdateOptions (#27759) --- types/mongoose/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 1beed12c69..fbdad58c4b 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -2983,6 +2983,8 @@ declare module "mongoose" { rawResult?: boolean; /** overwrites the schema's strict mode option for this update */ strict?: boolean; + /** The context option lets you set the value of this in update validators to the underlying query. */ + context?: string; } interface ModelFindOneAndUpdateOptions extends ModelFindByIdAndUpdateOptions { From 5f81770afbebe9eca5147d75a0b2559bb5aca6d7 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 6 Aug 2018 10:29:53 -0700 Subject: [PATCH 13/49] mocha: Fix $ExpectType assertions (#27774) --- types/mocha/mocha-tests.ts | 51 +++++++++++++------------------------- 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/types/mocha/mocha-tests.ts b/types/mocha/mocha-tests.ts index e175c1cc53..b21abb9ffd 100644 --- a/types/mocha/mocha-tests.ts +++ b/types/mocha/mocha-tests.ts @@ -748,16 +748,14 @@ function test_reporter_string(localMocha: LocalMocha) { // $ExpectType BrowserMocha mocha.reporter('html'); - // $ExpectType Mocha - localMocha.reporter('html'); + const m: Mocha = localMocha.reporter('html'); } function test_reporter_function(localMocha: LocalMocha) { // $ExpectType BrowserMocha mocha.reporter(class extends LocalMocha.reporters.Base { }); - // $ExpectType Mocha - localMocha.reporter(class extends LocalMocha.reporters.Base { }); + const m: Mocha = localMocha.reporter(class extends LocalMocha.reporters.Base { }); } function test_browser_mocha_setup_slow_option() { @@ -836,63 +834,51 @@ function test_browser_mocha_setup_all_options() { } function test_constructor_slow_option() { - // $ExpectType Mocha - new LocalMocha({ slow: 25 }); + const m: Mocha = new LocalMocha({ slow: 25 }); } function test_constructor_timeout_option() { - // $ExpectType Mocha - new LocalMocha({ timeout: 25 }); + const m: Mocha = new LocalMocha({ timeout: 25 }); } function test_constructor_globals_option() { - // $ExpectType Mocha - new LocalMocha({ globals: ['mocha'] }); + const m: Mocha = new LocalMocha({ globals: ['mocha'] }); } function test_constructor_ui_option() { - // $ExpectType Mocha - new LocalMocha({ ui: 'bdd' }); + const m: Mocha = new LocalMocha({ ui: 'bdd' }); } function test_constructor_reporter_string_option() { - // $ExpectType Mocha - new LocalMocha({ reporter: 'html' }); + const m: Mocha = new LocalMocha({ reporter: 'html' }); } function test_constructor_reporter_function_option() { - // $ExpectType Mocha - new LocalMocha({ reporter: class extends LocalMocha.reporters.Base { } }); + const m: Mocha = new LocalMocha({ reporter: class extends LocalMocha.reporters.Base { } }); } function test_constructor_bail_option() { - // $ExpectType Mocha - new LocalMocha({ bail: false }); + const m: Mocha = new LocalMocha({ bail: false }); } function test_constructor_ignore_leaks_option() { - // $ExpectType Mocha - new LocalMocha({ ignoreLeaks: false }); + const m: Mocha = new LocalMocha({ ignoreLeaks: false }); } function test_constructor_grep_string_option() { - // $ExpectType Mocha - new LocalMocha({ grep: "describe" }); + const m: Mocha = new LocalMocha({ grep: "describe" }); } function test_constructor_grep_regex_option() { - // $ExpectType Mocha - new LocalMocha({ grep: new RegExp('describe') }); + const m: Mocha = new LocalMocha({ grep: new RegExp('describe') }); } function test_constructor_grep_regex_literal_option() { - // $ExpectType Mocha - new LocalMocha({ grep: /(expect|should)/i }); + const m: Mocha = new LocalMocha({ grep: /(expect|should)/i }); } function test_constructor_all_options() { - // $ExpectType Mocha - new LocalMocha({ + const m: Mocha = new LocalMocha({ slow: 25, timeout: 25, ui: 'bdd', @@ -1154,8 +1140,7 @@ function test_suite_events(suite: LocalMocha.Suite) { context; // $ExpectType string file; - // $ExpectType Mocha - mocha; + const m: Mocha = mocha; }); // $ExpectType Suite @@ -1164,8 +1149,7 @@ function test_suite_events(suite: LocalMocha.Suite) { module; // $ExpectType string file; - // $ExpectType Mocha - mocha; + const m: Mocha = mocha; }); // $ExpectType Suite @@ -1174,8 +1158,7 @@ function test_suite_events(suite: LocalMocha.Suite) { context; // $ExpectType string file; - // $ExpectType Mocha - mocha; + const m: Mocha = mocha; }); } From 1d9679b2dcf7c9643d623b626c0820f84eaa8d7e Mon Sep 17 00:00:00 2001 From: Ferdy Budhidharma Date: Mon, 6 Aug 2018 12:51:26 -0500 Subject: [PATCH 14/49] [react] add library managed attributes and upgrade TS requirement to 2.8 (#27901) * feat(react): add library managed attributes and upgrade to 2.8 * fix broken tests * fix lint errors --- types/create-react-class/index.d.ts | 2 +- types/gestalt/index.d.ts | 2 +- .../hoist-non-react-statics-tests.tsx | 13 +- types/react-adal/index.d.ts | 2 +- types/react-addons-create-fragment/index.d.ts | 2 +- .../index.d.ts | 2 +- .../index.d.ts | 2 +- .../react-addons-pure-render-mixin/index.d.ts | 2 +- types/react-addons-shallow-compare/index.d.ts | 2 +- types/react-addons-test-utils/index.d.ts | 2 +- .../react-addons-transition-group/index.d.ts | 2 +- types/react-addons-update/index.d.ts | 2 +- types/react-aria-modal/index.d.ts | 2 +- types/react-dom-factories/index.d.ts | 2 +- types/react-dom/index.d.ts | 2 +- types/react-dom/v15/index.d.ts | 2 +- types/react-dragtastic/index.d.ts | 2 +- types/react-flag-icon-css/index.d.ts | 2 +- types/react-highlight/index.d.ts | 2 +- types/react-input-autosize/index.d.ts | 2 +- types/react-intl/react-intl-tests.tsx | 6 +- types/react-no-ssr/index.d.ts | 2 +- types/react-plotly.js/index.d.ts | 2 +- types/react-portal/v3/index.d.ts | 2 +- types/react-qr-reader/index.d.ts | 2 +- .../test/examples/Experimental.tsx | 2 +- types/react-select/v1/index.d.ts | 2 +- types/react-test-renderer/v15/tsconfig.json | 5 +- types/react/index.d.ts | 64 ++++--- types/react/test/index.ts | 18 +- types/react/test/managedAttributes.tsx | 160 ++++++++++++++++++ types/react/tsconfig.json | 3 +- types/react/v15/index.d.ts | 2 +- types/react/v15/test/index.ts | 2 +- types/react/v15/tsconfig.json | 7 +- types/recompose/index.d.ts | 2 +- types/recompose/recompose-tests.tsx | 2 +- types/single-spa-react/index.d.ts | 2 +- 38 files changed, 264 insertions(+), 72 deletions(-) create mode 100644 types/react/test/managedAttributes.tsx diff --git a/types/create-react-class/index.d.ts b/types/create-react-class/index.d.ts index 9a1b0b12b5..9b9d2b2ad5 100644 --- a/types/create-react-class/index.d.ts +++ b/types/create-react-class/index.d.ts @@ -2,7 +2,7 @@ // Project: https://facebook.github.io/react/ // Definitions by: John Gozde // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentSpec, ClassicComponentClass } from "react"; diff --git a/types/gestalt/index.d.ts b/types/gestalt/index.d.ts index d3ceb5672e..162d61dd52 100644 --- a/types/gestalt/index.d.ts +++ b/types/gestalt/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/pinterest/gestalt // Definitions by: Nicolás Serrano Arévalo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/hoist-non-react-statics/hoist-non-react-statics-tests.tsx b/types/hoist-non-react-statics/hoist-non-react-statics-tests.tsx index 9767614bcc..0e1beed2e9 100644 --- a/types/hoist-non-react-statics/hoist-non-react-statics-tests.tsx +++ b/types/hoist-non-react-statics/hoist-non-react-statics-tests.tsx @@ -1,13 +1,14 @@ -import * as React from 'react'; +import * as React from 'react'; import * as PropTypes from 'prop-types'; import hoistNonReactStatics = require('hoist-non-react-statics'); -class A extends React.Component<{x: number, y?: number}> { +class A extends React.Component<{ x: number; y?: number | null }> { static a = 'a'; static propTypes = { - m: PropTypes.number.isRequired + x: PropTypes.number.isRequired, + y: PropTypes.number, }; getA() { @@ -19,7 +20,7 @@ class B extends React.Component { static b = 'b'; static propTypes = { - n: PropTypes.number.isRequired + n: PropTypes.number.isRequired, }; getB() { @@ -31,13 +32,13 @@ const C = hoistNonReactStatics(A, B); C.a !== C.b; -C.propTypes.m; +C.propTypes.x; C.prototype.getA(); C.propTypes.n; // $ExpectError C.prototype.getB(); // $ExpectError -; +; const D = hoistNonReactStatics(A, B, { a: true, b: true }); diff --git a/types/react-adal/index.d.ts b/types/react-adal/index.d.ts index 9f3cd9bef2..40a8d5d3bc 100644 --- a/types/react-adal/index.d.ts +++ b/types/react-adal/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/salvoravida/react-adal#readme // Definitions by: Dmitry Korolev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-addons-create-fragment/index.d.ts b/types/react-addons-create-fragment/index.d.ts index 1e46046ec4..25e4ba9b43 100644 --- a/types/react-addons-create-fragment/index.d.ts +++ b/types/react-addons-create-fragment/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-addons-css-transition-group/index.d.ts b/types/react-addons-css-transition-group/index.d.ts index 33d43b4cd1..03cdc48303 100644 --- a/types/react-addons-css-transition-group/index.d.ts +++ b/types/react-addons-css-transition-group/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import 'react-addons-transition-group'; import { ComponentClass, CSSTransitionGroupProps } from 'react'; diff --git a/types/react-addons-linked-state-mixin/index.d.ts b/types/react-addons-linked-state-mixin/index.d.ts index 6358dde535..1c590e333f 100644 --- a/types/react-addons-linked-state-mixin/index.d.ts +++ b/types/react-addons-linked-state-mixin/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Mixin } from 'react'; diff --git a/types/react-addons-pure-render-mixin/index.d.ts b/types/react-addons-pure-render-mixin/index.d.ts index 565a108721..a154dbe594 100644 --- a/types/react-addons-pure-render-mixin/index.d.ts +++ b/types/react-addons-pure-render-mixin/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Mixin } from 'react'; diff --git a/types/react-addons-shallow-compare/index.d.ts b/types/react-addons-shallow-compare/index.d.ts index ff4e5dbdc9..5d6942ed24 100644 --- a/types/react-addons-shallow-compare/index.d.ts +++ b/types/react-addons-shallow-compare/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { Component } from 'react'; diff --git a/types/react-addons-test-utils/index.d.ts b/types/react-addons-test-utils/index.d.ts index 9282f95f4e..0531c5e3f6 100644 --- a/types/react-addons-test-utils/index.d.ts +++ b/types/react-addons-test-utils/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { AbstractView, Component, ComponentClass, ReactElement, ReactInstance, ClassType, diff --git a/types/react-addons-transition-group/index.d.ts b/types/react-addons-transition-group/index.d.ts index 933533df28..79f76bf84e 100644 --- a/types/react-addons-transition-group/index.d.ts +++ b/types/react-addons-transition-group/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ComponentClass, TransitionGroupProps } from 'react'; diff --git a/types/react-addons-update/index.d.ts b/types/react-addons-update/index.d.ts index 874549b7a1..5a1018d2c2 100644 --- a/types/react-addons-update/index.d.ts +++ b/types/react-addons-update/index.d.ts @@ -2,7 +2,7 @@ // Project: http://facebook.github.io/react/ // Definitions by: Asana , AssureSign , Microsoft // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-aria-modal/index.d.ts b/types/react-aria-modal/index.d.ts index 83ca6d3a34..4083d08473 100644 --- a/types/react-aria-modal/index.d.ts +++ b/types/react-aria-modal/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/davidtheclark/react-aria-modal#readme // Definitions by: forabi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import React = require('react'); diff --git a/types/react-dom-factories/index.d.ts b/types/react-dom-factories/index.d.ts index eaf04f766f..b0bcb5bfa6 100644 --- a/types/react-dom-factories/index.d.ts +++ b/types/react-dom-factories/index.d.ts @@ -2,7 +2,7 @@ // Project: https://facebook.github.io/react/ // Definitions by: John Gozde // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactDOMFactories; export = ReactDOMFactories; diff --git a/types/react-dom/index.d.ts b/types/react-dom/index.d.ts index e7a5afe59d..518c0c617c 100644 --- a/types/react-dom/index.d.ts +++ b/types/react-dom/index.d.ts @@ -6,7 +6,7 @@ // MartynasZilinskas // Josh Rutherford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactDOM; diff --git a/types/react-dom/v15/index.d.ts b/types/react-dom/v15/index.d.ts index bd39e0a5e1..8a22fd9bc2 100644 --- a/types/react-dom/v15/index.d.ts +++ b/types/react-dom/v15/index.d.ts @@ -5,7 +5,7 @@ // Microsoft // MartynasZilinskas // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 export as namespace ReactDOM; diff --git a/types/react-dragtastic/index.d.ts b/types/react-dragtastic/index.d.ts index 64ce099e2f..fbfaf42cff 100644 --- a/types/react-dragtastic/index.d.ts +++ b/types/react-dragtastic/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/chrisjpatty/react-dragtastic#readme // Definitions by: Nicolás Scarcella // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import { ReactNode, Component, MouseEventHandler, TouchEventHandler } from 'react'; diff --git a/types/react-flag-icon-css/index.d.ts b/types/react-flag-icon-css/index.d.ts index ad1777670a..74c3e04efe 100644 --- a/types/react-flag-icon-css/index.d.ts +++ b/types/react-flag-icon-css/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/matteocng/react-flag-icon-css#readme // Definitions by: Jon Freedman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as CSS from 'csstype'; import { PureComponent, ReactNode } from 'react'; diff --git a/types/react-highlight/index.d.ts b/types/react-highlight/index.d.ts index 2ab09ee3a9..715a25b23b 100644 --- a/types/react-highlight/index.d.ts +++ b/types/react-highlight/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/akiran/react-highlight // Definitions by: Josh Goldberg // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-input-autosize/index.d.ts b/types/react-input-autosize/index.d.ts index f8f6f5b06f..0a86381736 100644 --- a/types/react-input-autosize/index.d.ts +++ b/types/react-input-autosize/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JedWatson/react-input-autosize#readme // Definitions by: Jason Unger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.7 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-intl/react-intl-tests.tsx b/types/react-intl/react-intl-tests.tsx index 2ed6eb0d98..782c4de889 100644 --- a/types/react-intl/react-intl-tests.tsx +++ b/types/react-intl/react-intl-tests.tsx @@ -4,6 +4,7 @@ */ import * as React from "react"; +import * as PropTypes from "prop-types"; import * as reactMixin from "react-mixin"; import { @@ -63,8 +64,9 @@ const SomeFunctionalComponentWithIntl: React.ComponentClass }); class SomeComponent extends React.Component { - static propTypes: React.ValidationMap = { - intl: intlShape.isRequired + static propTypes: React.ValidationMap = { + intl: intlShape.isRequired, + className: PropTypes.string.isRequired }; render(): React.ReactElement<{}> { const intl = this.props.intl; diff --git a/types/react-no-ssr/index.d.ts b/types/react-no-ssr/index.d.ts index 77d52af1ff..9ca00149d0 100644 --- a/types/react-no-ssr/index.d.ts +++ b/types/react-no-ssr/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/kadirahq/react-no-ssr // Definitions by: Rafał Filipek // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-plotly.js/index.d.ts b/types/react-plotly.js/index.d.ts index ac24016496..4dfc3b0ce3 100644 --- a/types/react-plotly.js/index.d.ts +++ b/types/react-plotly.js/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/plotly/react-plotly.js#readme // Definitions by: Jon Freedman // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as Plotly from 'plotly.js'; import * as React from 'react'; diff --git a/types/react-portal/v3/index.d.ts b/types/react-portal/v3/index.d.ts index 7595c5e8ad..4d869009e6 100644 --- a/types/react-portal/v3/index.d.ts +++ b/types/react-portal/v3/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/tajo/react-portal#readme // Definitions by: Shun Takahashi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-qr-reader/index.d.ts b/types/react-qr-reader/index.d.ts index d58da0e89f..de426667c0 100644 --- a/types/react-qr-reader/index.d.ts +++ b/types/react-qr-reader/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/JodusNodus/react-qr-reader // Definitions by: David Kevork // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from "react"; diff --git a/types/react-select/test/examples/Experimental.tsx b/types/react-select/test/examples/Experimental.tsx index c0bbf3c6ad..1317abbf5a 100644 --- a/types/react-select/test/examples/Experimental.tsx +++ b/types/react-select/test/examples/Experimental.tsx @@ -89,7 +89,7 @@ const daysHeaderItemStyles = { cursor: 'default', // display: 'block', fontSize: '75%', - fontWeight: 500, + fontWeight: 500 as 500, display: 'inline-block', width: '12%', margin: '0 1%', diff --git a/types/react-select/v1/index.d.ts b/types/react-select/v1/index.d.ts index 31ff0db561..59bea6d815 100644 --- a/types/react-select/v1/index.d.ts +++ b/types/react-select/v1/index.d.ts @@ -16,7 +16,7 @@ // Endurance Idehen // Guillaume Chartier // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; diff --git a/types/react-test-renderer/v15/tsconfig.json b/types/react-test-renderer/v15/tsconfig.json index 4be2e2797f..0c98103ec8 100644 --- a/types/react-test-renderer/v15/tsconfig.json +++ b/types/react-test-renderer/v15/tsconfig.json @@ -9,6 +9,9 @@ "react": [ "react/v15" ], + "react-dom": [ + "react-dom/v15" + ], "react-test-renderer": [ "react-test-renderer/v15" ] @@ -30,4 +33,4 @@ "shallow/index.d.ts", "react-test-renderer-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/react/index.d.ts b/types/react/index.d.ts index c130068ca0..2c7110237c 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -19,11 +19,12 @@ // Olivier Pascal // Martin Hochel // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /// import * as CSS from 'csstype'; +import * as PropTypes from 'prop-types'; type NativeAnimationEvent = AnimationEvent; type NativeClipboardEvent = ClipboardEvent; @@ -2205,30 +2206,28 @@ declare namespace React { // React.PropTypes // ---------------------------------------------------------------------- - type Validator = { bivarianceHack(object: T, key: string, componentName: string, ...rest: any[]): Error | null }["bivarianceHack"]; + type Validator = PropTypes.Validator; - interface Requireable extends Validator { - isRequired: Validator; - } + type Requireable = PropTypes.Requireable; - type ValidationMap = {[K in keyof T]?: Validator }; + type ValidationMap = PropTypes.ValidationMap; interface ReactPropTypes { - any: Requireable; - array: Requireable; - bool: Requireable; - func: Requireable; - number: Requireable; - object: Requireable; - string: Requireable; - node: Requireable; - element: Requireable; - instanceOf(expectedClass: {}): Requireable; - oneOf(types: any[]): Requireable; - oneOfType(types: Array>): Requireable; - arrayOf(type: Validator): Requireable; - objectOf(type: Validator): Requireable; - shape(type: ValidationMap): Requireable; + any: typeof PropTypes.any; + array: typeof PropTypes.array; + bool: typeof PropTypes.bool; + func: typeof PropTypes.func; + number: typeof PropTypes.number; + object: typeof PropTypes.object; + string: typeof PropTypes.string; + node: typeof PropTypes.node; + element: typeof PropTypes.element; + instanceOf: typeof PropTypes.instanceOf; + oneOf: typeof PropTypes.oneOf; + oneOfType: typeof PropTypes.oneOfType; + arrayOf: typeof PropTypes.arrayOf; + objectOf: typeof PropTypes.objectOf; + shape: typeof PropTypes.shape; } // @@ -2282,6 +2281,21 @@ declare namespace React { } } +// Declared props take priority over inferred props +// If declared props have indexed properties, ignore inferred props entirely as keyof gets widened +type MergePropTypes = P & Pick>; + +// Any prop that has a default prop becomes optional, but its type is unchanged +// Undeclared default props are augmented into the resulting allowable attributes +// If declared props have indexed properties, ignore default props entirely as keyof gets widened +// Wrap in an outer-level conditional type to allow distribution over props that are unions +type Defaultize = P extends any + ? string extends keyof P ? P : + & Pick> + & Partial>> + & Partial>> + : never; + declare global { namespace JSX { // tslint:disable-next-line:no-empty-interface @@ -2292,6 +2306,14 @@ declare global { interface ElementAttributesProperty { props: {}; } interface ElementChildrenAttribute { children: {}; } + type LibraryManagedAttributes = C extends { propTypes: infer T; defaultProps: infer D; } + ? Defaultize>, D> + : C extends { propTypes: infer T; } + ? MergePropTypes> + : C extends { defaultProps: infer D; } + ? Defaultize + : P; + // tslint:disable-next-line:no-empty-interface interface IntrinsicAttributes extends React.Attributes { } // tslint:disable-next-line:no-empty-interface diff --git a/types/react/test/index.ts b/types/react/test/index.ts index 227ba5721d..a78a480199 100644 --- a/types/react/test/index.ts +++ b/types/react/test/index.ts @@ -1,6 +1,7 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; import * as ReactDOMServer from "react-dom/server"; +import * as PropTypes from "prop-types"; import createFragment = require("react-addons-create-fragment"); import CSSTransitionGroup = require("react-addons-css-transition-group"); import * as LinkedStateMixin from "react-addons-linked-state-mixin"; @@ -15,12 +16,12 @@ import * as DOM from "react-dom-factories"; interface Props extends React.Attributes { hello: string; - world?: string; + world?: string | null; foo: number; } interface State { - inputValue?: string; + inputValue?: string | null; seconds?: number; } @@ -29,7 +30,7 @@ interface Snapshot { } interface Context { - someValue?: string; + someValue?: string | null; } interface ChildContext { @@ -117,15 +118,18 @@ declare const container: Element; class ModernComponent extends React.Component implements MyComponent, React.ChildContextProvider { static propTypes: React.ValidationMap = { - foo: (() => null) as React.Validator + hello: PropTypes.string.isRequired, + world: PropTypes.string, + foo: PropTypes.number.isRequired, + key: > PropTypes.oneOfType([PropTypes.number, PropTypes.string]) }; static contextTypes: React.ValidationMap = { - someValue: (() => null) as React.Validator + someValue: PropTypes.string }; static childContextTypes: React.ValidationMap = { - someOtherValue: (() => null) as React.Validator + someOtherValue: PropTypes.string.isRequired }; context: Context; @@ -156,7 +160,7 @@ class ModernComponent extends React.Component return DOM.div(null, DOM.input({ ref: input => this._input = input, - value: this.state.inputValue + value: this.state.inputValue ? this.state.inputValue : undefined }), DOM.input({ onChange: event => console.log(event.target) diff --git a/types/react/test/managedAttributes.tsx b/types/react/test/managedAttributes.tsx new file mode 100644 index 0000000000..56466e1cc8 --- /dev/null +++ b/types/react/test/managedAttributes.tsx @@ -0,0 +1,160 @@ +interface LeaveMeAloneDtslint { foo: string; } +// // Re-enable when we move @types/react to TS 3.0 + +// import * as React from 'react'; +// import * as PropTypes from 'prop-types'; + +// interface Props { +// bool?: boolean +// fnc: () => any +// node?: React.ReactNode +// num?: number +// reqNode: NonNullable +// str: string +// } + +// const propTypes = { +// bool: PropTypes.bool, +// fnc: PropTypes.func.isRequired, +// node: PropTypes.node, +// num: PropTypes.number, +// str: PropTypes.string.isRequired, +// extraStr: PropTypes.string.isRequired, +// extraNum: PropTypes.number +// }; + +// const defaultProps = { +// fnc: function() { return 'abc' } as () => any, +// extraBool: false, +// reqNode: 'text_node' as React.ReactNode +// }; + +// class AnnotatedPropTypesAndDefaultProps extends React.Component { +// static propTypes = propTypes; +// static defaultProps = defaultProps; +// } + +// const annotatedPropTypesAndDefaultPropsTests = [ +// // $ExpectError +// , // str and extraStr are required +// , +// // $ExpectError +// , // num type mismatch +// } +// num={0} +// reqNode={} +// str='abc' +// /> +// ]; + +// class UnannotatedPropTypesAndDefaultProps extends React.Component { +// static propTypes = propTypes; +// static defaultProps = defaultProps; +// } + +// const unannotatedPropTypesAndDefaultPropsTests = [ +// // $ExpectError +// , // stra and extraStr are required +// , +// // $ExpectError +// , // extraBool type mismatch +// } +// num={0} +// reqNode={} +// str='abc' +// /> +// ]; + +// class AnnotatedPropTypes extends React.Component { +// static propTypes = propTypes; +// } + +// const annotatedPropTypesTests = [ +// // $ExpectError +// , // str, extraStr, reqNode and fnc are required +// } />, +// // $ExpectError +// } extraBool={false} />, // extraBool doesn't exist +// // $ExpectError +// } num='abc' />, // num type mismatch +// } +// num={0} +// reqNode={} +// str='abc' +// /> +// ]; + +// class UnannotatedPropTypes extends React.Component { +// static propTypes = propTypes; +// } + +// const unannotatedPropTypesTests = [ +// // $ExpectError +// , // str, extraStr and fnc are required +// , +// // $ExpectError +// } />, // reqNode doesn't exist +// // $ExpectError +// } num='abc' />, // num type mismatch +// } +// num={0} +// str='abc' +// /> +// ]; + +// class AnnotatedDefaultProps extends React.Component { +// static defaultProps = defaultProps; +// } + +// const annotatedDefaultPropsTests = [ +// // $ExpectError +// , // str is required +// , +// } />, +// // $ExpectError +// { }} />, // str type mismatch +// +// ]; + +// class UnannotatedDefaultProps extends React.Component { +// static defaultProps = defaultProps; +// } + +// const unannotatedDefaultPropsTests = [ +// , +// } +// /> +// ]; diff --git a/types/react/tsconfig.json b/types/react/tsconfig.json index 2bc92c4894..b666fac305 100644 --- a/types/react/tsconfig.json +++ b/types/react/tsconfig.json @@ -3,7 +3,8 @@ "index.d.ts", "test/index.ts", "test/tsx.tsx", - "test/cssProperties.tsx" + "test/cssProperties.tsx", + "test/managedAttributes.tsx" ], "compilerOptions": { "module": "commonjs", diff --git a/types/react/v15/index.d.ts b/types/react/v15/index.d.ts index 939e26c57a..65f00c258f 100644 --- a/types/react/v15/index.d.ts +++ b/types/react/v15/index.d.ts @@ -13,7 +13,7 @@ // Dovydas Navickas // Stéphane Goetz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 /* Known Problems & Workarounds diff --git a/types/react/v15/test/index.ts b/types/react/v15/test/index.ts index 45894cb397..6735e64eeb 100644 --- a/types/react/v15/test/index.ts +++ b/types/react/v15/test/index.ts @@ -256,7 +256,7 @@ const markup: string = ReactDOMServer.renderToStaticMarkup(element); const notValid: boolean = React.isValidElement(props); // false const isValid = React.isValidElement(element); // true let domNode = ReactDOM.findDOMNode(component); -domNode = ReactDOM.findDOMNode(domNode as Element); +domNode = ReactDOM.findDOMNode(domNode); // // React Elements diff --git a/types/react/v15/tsconfig.json b/types/react/v15/tsconfig.json index f9c13ee9f2..d3eb40aae7 100644 --- a/types/react/v15/tsconfig.json +++ b/types/react/v15/tsconfig.json @@ -12,9 +12,8 @@ "dom" ], "paths": { - "react": [ - "react/v15" - ] + "react": ["react/v15"], + "react-dom": ["react-dom/v15"] }, "noImplicitAny": true, "noImplicitThis": false, @@ -29,4 +28,4 @@ "forceConsistentCasingInFileNames": true, "jsx": "preserve" } -} \ No newline at end of file +} diff --git a/types/recompose/index.d.ts b/types/recompose/index.d.ts index 49d872c902..f0ad8596ab 100644 --- a/types/recompose/index.d.ts +++ b/types/recompose/index.d.ts @@ -141,7 +141,7 @@ declare module 'recompose' { stateUpdaterName: TStateUpdaterName, initialState: TState | mapper ): InferableComponentEnhancerWithProps< - TOutter & stateProps, + stateProps, TOutter >; diff --git a/types/recompose/recompose-tests.tsx b/types/recompose/recompose-tests.tsx index 8c45ac2021..9058a10f4d 100644 --- a/types/recompose/recompose-tests.tsx +++ b/types/recompose/recompose-tests.tsx @@ -257,7 +257,7 @@ function testWithState() { // We can also actually provide the generic necessary const enhancer3 = withState("count", "setCount", 1); const Enhanced3 = enhancer3(props => { - return
{props.title}
; + return
{props.count}
; }); const rendered3 = ( diff --git a/types/single-spa-react/index.d.ts b/types/single-spa-react/index.d.ts index 67721695ec..82656bfaf5 100644 --- a/types/single-spa-react/index.d.ts +++ b/types/single-spa-react/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/CanopyTax/single-spa-react // Definitions by: Garrett Smith // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.6 +// TypeScript Version: 2.8 import * as React from 'react'; import * as ReactDOM from 'react-dom'; From 732164843295a10ec68aa0fc8f375f33bc171e76 Mon Sep 17 00:00:00 2001 From: Alex Jerabek <38896772+AlexJerabek@users.noreply.github.com> Date: Mon, 6 Aug 2018 11:31:12 -0700 Subject: [PATCH 15/49] [Office-js] Adding support tables to Shared API methods (#27829) * Adding support details to shared API enums * COrrecting link syntax * Adding support tables --- types/office-js/index.d.ts | 1526 +++++++++++++++++++++++++++++------- 1 file changed, 1246 insertions(+), 280 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index f0adb92080..d24d35d469 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -239,6 +239,25 @@ declare namespace Office { /** * Gets the Context object that represents the runtime environment of the add-in and provides access to the top-level objects of the API. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ var context: Context; /** @@ -253,7 +272,23 @@ declare namespace Office { * *Note*: The reason parameter of the initialize event listener function only returns an `InitializationReason` enumeration value for task pane and content add-ins. It does not return a value for Outlook add-ins. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
* * @param reason Indicates how the app was initialized. */ @@ -269,7 +304,23 @@ declare namespace Office { * Toggles on and off the `Office` alias for the full `Microsoft.Office.WebExtension` namespace. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
* * @param useShortNamespace True to use the shortcut alias; otherwise false to disable it. The default is true. */ @@ -454,32 +505,96 @@ declare namespace Office { * Gets the user-defined item passed to the optional `asyncContext` parameter of the invoked method in the same state as it was passed in. This returns the user-defined item (which can be of any JavaScript type: String, Number, Boolean, Object, Array, Null, or Undefined) passed to the optional `asyncContext` parameter of the invoked method. Returns Undefined, if you didn't pass anything to the asyncContext parameter. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project
Word Y Y Y
*/ asyncContext: any; /** - * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. - * - * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
- */ - status: AsyncResultStatus; - /** * Gets an {@link Office.Error} object that provides a description of the error, if any error occurred. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ error: Office.Error; /** + * Gets the {@link Office.AsyncResultStatus} of the asynchronous operation. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
+ */ + status: AsyncResultStatus; + /** * Gets the payload or content of this asynchronous operation, if any. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
- * * You access the AsyncResult object in the function passed as the argument to the callback parameter of an "Async" method, such as the `getSelectedDataAsync` and `setSelectedDataAsync` methods of the {@link Office.Document | Document} object. * - * Note: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. + * Note: What the value property returns for a particular "Async" method varies depending on the purpose and context of that method. + * To determine what is returned by the value property for an "Async" method, refer to the "Callback value" section of the method's topic. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ value: any; } @@ -503,6 +618,28 @@ declare namespace Office { commerceAllowed: boolean; /** * Gets the locale (language) specified by the user for editing the document or item. + * + * @remarks + * The `contentLanguage` value reflects the **Editing Language** setting specified with **File > Options > Language** in the Office host application. + * + * In content add-ins for Access web apps, the `contentLanguage` property gets the add-in culture (e.g., "en-GB"). + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ contentLanguage: string; /** @@ -513,11 +650,53 @@ declare namespace Office { * Gets the locale (language) specified by the user for the UI of the Office host application. * * @remarks + * + * The returned value is a string in the RFC 1766 Language tag format, such as en-US. + * + * The `displayLanguage` value reflects the current **Display Language** setting specified with **File > Options > Language** in the Office host application. + * + * In content add-ins for Access web apps, the `displayLanguage property` gets the add-in language (e.g., "en-US"). + * * When using in Outlook, the applicable modes are Compose or read. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y
*/ displayLanguage: string; /** * Gets an object that represents the document the content or task pane add-in is interacting with. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ document: Document; /** @@ -588,9 +767,24 @@ declare namespace Office { * Provides specific information about an error that occurred during an asynchronous data operation. * * @remarks - *
HostsAccess, Excel, Outlook, PowerPoint, Project, Word
- * * The Error object is accessed from the AsyncResult object that is returned in the function passed as the callback argument of an asynchronous data operation, such as the setSelectedDataAsync method of the Document object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad OWA for Devices Office for Mac
Access Y
Excel Y Y Y
Outlook Y Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
*/ interface Error { /** @@ -610,13 +804,9 @@ declare namespace Office { /** * The event object is passed as a parameter to add-in functions invoked by UI-less command buttons. The object allows the add-in to identify which button was clicked and to signal the host that it has completed its processing. * - * [Api set: Mailbox 1.3] - * * @remarks * - * - * - * + *
HostsExcel, Outlook, PowerPoint, Word
Add-in typeContent, task pane, Outlook
* * * @@ -625,10 +815,21 @@ declare namespace Office { interface Event { /** - * Information about the control that triggered calling this function + * Information about the control that triggered calling this function. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + *
Add-in typeContent, task pane, Outlook
{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}Restricted
+ * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Outlook Y (Mailbox 1.3)
*/ source:Source; - /** * Indicates that the add-in has completed processing that was triggered by an add-in command button or event handler. * @@ -644,6 +845,21 @@ declare namespace Office { * * {@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}Compose or read * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Outlook Y (Mailbox 1.3)
PowerPoint Y Y Y
Word Y Y Y
+ * * @param options Optional. An object literal that contains one or more of the following properties. * allowEvent: A boolean value. When the completed method is used to signal completion of an event handler, this value indicates of the handled event should continue execution or be canceled. For example, an add-in that handles the ItemSend event can set allowEvent = false to cancel sending of the message. */ @@ -1168,7 +1384,21 @@ declare namespace Office { * Using Office theme colors lets you coordinate the color scheme of your add-in with the current Office theme selected by the user with File > Office Account > Office Theme UI, which is applied across all Office host applications. Using Office theme colors is appropriate for mail and task pane add-ins. * * @remarks - *
HostsExcel, Outlook, Powerpoint, Project, Word
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that these properties are supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop
Excel Y
Outlook Y
PowerPoint Y
Word Y
*/ interface OfficeTheme { /** @@ -1216,6 +1446,22 @@ declare namespace Office { * Returns a promise of an object described in the expression. Callback is invoked only if method fails. * @param expression The object to be retrieved. Example "bindings#BindingName", retrieves a binding promise for a binding named 'BindingName' * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y
*/ function select(expression: string, callback?: (result: AsyncResult) => void): Binding; // Enumerations @@ -1451,18 +1697,62 @@ declare namespace Office { enum EventType { /** * A Document.ActiveViewChanged event was raised. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
*/ ActiveViewChanged, /** * Occurs when data within the binding is changed. * To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object. * The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ BindingDataChanged, /** * Occurs when the selection is changed within the binding. * To add an event handler for the BindingSelectionChanged event of a binding, use the addHandlerAsync method of the Binding object. * The event handler receives an argument of type {@link Office.BindingSelectionChangedEventArgs}. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ BindingSelectionChanged, /** @@ -1474,7 +1764,20 @@ declare namespace Office { */ DialogEventReceived, /** - * Triggers when a document level selection happens. + * Triggers when a document level selection happens + * + * **Support details** + * + * A capital Y in the following matrix indicates that this enumeration is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this enumeration. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
Word Y Y
*/ DocumentSelectionChanged, /** @@ -1509,6 +1812,21 @@ declare namespace Office { ResourceSelectionChanged, /** * A Settings.settingsChanged event was raised. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
*/ SettingsChanged, /** @@ -1730,36 +2048,39 @@ declare namespace Office { * Represents a binding to a section of the document. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBinding, TableBinding, TextBinding
* * The Binding object exposes the functionality possessed by all bindings regardless of type. * * The Binding object is never called directly. It is the abstract parent class of the objects that represent each type of binding: MatrixBinding, TableBinding, or TextBinding. All three of these objects inherit the getDataAsync and setDataAsync methods from the Binding object that enable to you interact with the data in the binding. They also inherit the id and type properties for querying those property values. Additionally, the MatrixBinding and TableBinding objects expose additional methods for matrix- and table-specific features, such as counting the number of rows and columns. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ interface Binding { /** * Get the Document object associated with the binding. - * - * @remarks - *
HostsAccess, Excel, Word
*/ document: Document; /** * A string that uniquely identifies this binding among the bindings in the same Document object. - * - * @remarks - *
HostsAccess, Excel, Word
*/ id: string; /** * Gets the type of the binding. - * - * @remarks - *
HostsAccess, Excel, Word
*/ type: BindingType; /** @@ -1778,8 +2099,6 @@ declare namespace Office { * Returns the data contained within the binding. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
* * When called from a MatrixBinding or TableBinding, the getDataAsync method will return a subset of the bound values if the optional startRow, startColumn, rowCount, and columnCount parameters are specified (and they specify a contiguous and valid range). @@ -1792,8 +2111,6 @@ declare namespace Office { * Removes the specified handler from the binding for the specified event type. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsBindingEvents
* * @param eventType The event type. For bindings, it can be `Office.EventType.BindingDataChanged` or `Office.EventType.BindingSelectionChanged`. @@ -1805,8 +2122,6 @@ declare namespace Office { * Writes data to the bound section of the document represented by the specified binding object. * * @remarks - * - * * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
* @@ -2000,24 +2315,32 @@ declare namespace Office { /** * Represents the bindings the add-in has within the document. - * - * @remarks - *
HostsAccess, Excel, Word
*/ interface Bindings { /** - * Gets an {@link Office.Document} object that represents the document associated with this set of bindings. - * - * @remarks - *
HostsAccess, Excel, Word
- */ + * Gets an {@link Office.Document} object that represents the document associated with this set of bindings. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
+ */ document: Document; /** * Creates a binding against a named object in the document. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
* * For Excel, the itemName parameter can refer to a named range or a table. @@ -2032,6 +2355,19 @@ declare namespace Office { * * Note: In Word, if there are multiple Rich Text content controls with the same Title property value (name), and you try to bind to one these content controls with this method (by specifying its name as the itemName parameter), the operation will fail. * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* @param itemName Name of the bindable object in the document. For Example 'MyExpenses' table in Excel." * @param bindingType The {@link Office.BindingType} for the data. The method returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for configuring the binding that is created. @@ -2042,11 +2378,22 @@ declare namespace Office { * Create a binding by prompting the user to make a selection on the document. * * @remarks - * - * *
HostsAccess, Excel
Requirement SetsNot in a set
* * Adds a binding object of the specified type to the Bindings collection, which will be identified with the supplied id. The method fails if the specified selection cannot be bound. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
* * @param bindingType Specifies the type of the binding object to create. Required. Returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for configuring the prompt and identifying the binding that is created. @@ -2057,13 +2404,26 @@ declare namespace Office { * Create a binding based on the user's current selection. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
* * Adds the specified type of binding object to the Bindings collection, which will be identified with the supplied id. * - * Note In Excel, if you call the addFromSelectionAsync method passing in the Binding.id of an existing binding, the Binding.type of that binding is used, and its type cannot be changed by specifying a different value for the bindingType parameter.If you need to use an existing id and change the bindingType, call the Bindings.releaseByIdAsync method first to release the binding, and then call the addFromSelectionAsync method to reestablish the binding with a new type. + * Note In Excel, if you call the addFromSelectionAsync method passing in the Binding.id of an existing binding, the Binding.type of that binding is used, and its type cannot be changed by specifying a different value for the bindingType parameter. + * If you need to use an existing id and change the bindingType, call the Bindings.releaseByIdAsync method first to release the binding, and then call the addFromSelectionAsync method to reestablish the binding with a new type. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param bindingType Specifies the type of the binding object to create. Required. Returns null if the selected object cannot be coerced into the specified type. * @param options Provides options for configuring the prompt and identifying the binding that is created. @@ -2074,9 +2434,21 @@ declare namespace Office { * Gets all bindings that were previously created. * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2086,11 +2458,23 @@ declare namespace Office { * Retrieves a binding based on its Name * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsCustomXmlParts, MatrixBindings, TableBindings, TextBindings
* * Fails if the specified id does not exist. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param id Specifies the unique name of the binding object. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2101,11 +2485,23 @@ declare namespace Office { * Removes the binding from the document * * @remarks - * - * *
HostsAccess, Excel, Word
Requirement SetsMatrixBindings, TableBindings, TextBindings
* * Fails if the specified id does not exist. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param id Specifies the unique name to be used to identify the binding object. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2117,17 +2513,25 @@ declare namespace Office { * Represents an XML node in a tree in a document. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
+ *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
*/ interface CustomXmlNode { /** * Gets the base name of the node without the namespace prefix, if one exists. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
*/ baseName: string; @@ -2135,8 +2539,6 @@ declare namespace Office { * Retrieves the string GUID of the CustomXMLPart. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
*/ namespaceUri: string; @@ -2144,8 +2546,6 @@ declare namespace Office { * Gets the type of the CustomXMLNode. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
*/ nodeType: string; @@ -2153,8 +2553,6 @@ declare namespace Office { * Gets the nodes associated with the XPath expression. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param xPath The XPath expression that specifies the nodes to get. Required. @@ -2166,8 +2564,6 @@ declare namespace Office { * Gets the node value. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2178,8 +2574,6 @@ declare namespace Office { * Gets the text of an XML node in a custom XML part. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2190,8 +2584,6 @@ declare namespace Office { * Gets the node's XML. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2202,8 +2594,6 @@ declare namespace Office { * Sets the node value. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param value The value to be set on the node @@ -2228,8 +2618,6 @@ declare namespace Office { * Sets the node XML. * * @remarks - * - * *
HostsWord
Requirement SetsCustomXmlParts
* * @param xml The XML to be set on the node @@ -2242,36 +2630,31 @@ declare namespace Office { * Represents a single CustomXMLPart in an {@link Office.CustomXmlParts} collection. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
+ *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y Y
*/ interface CustomXmlPart { /** * True, if the custom XML part is built in; otherwise false. - * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
*/ builtIn: boolean; /** * Gets the GUID of the CustomXMLPart. - * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
*/ id: string; /** * Gets the set of namespace prefix mappings ({@link Office.CustomXmlPrefixMappings}) used against the current CustomXMLPart. - * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
*/ namespaceManager: CustomXmlPrefixMappings; @@ -2279,7 +2662,6 @@ declare namespace Office { * Adds an event handler to the object using the specified event type. * * @remarks - *
HostsWord
* * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * @@ -2293,9 +2675,6 @@ declare namespace Office { * Deletes the Custom XML Part. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2305,9 +2684,6 @@ declare namespace Office { * Asynchronously gets any CustomXmlNodes in this custom XML part which match the specified XPath. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * @param xPath An XPath expression that specifies the nodes you want returned. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -2318,9 +2694,6 @@ declare namespace Office { * Asynchronously gets the XML inside this custom XML part. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2330,9 +2703,6 @@ declare namespace Office { * Removes an event handler for the specified event type. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * @param eventType Specifies the type of event to remove. For a CustomXmlPart object, the eventType parameter can be specified as `Office.EventType.NodeDeleted`, `Office.EventType.NodeInserted`, and `Office.EventType.NodeReplaced`. * @param handler The name of the handler to remove. @@ -2346,7 +2716,18 @@ declare namespace Office { * Provides information about the deleted node that raised the nodeDeleted event. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ interface NodeDeletedEventArgs { /** @@ -2369,7 +2750,18 @@ declare namespace Office { * Provides information about the inserted node that raised the nodeInserted event. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ interface NodeInsertedEventArgs { /** @@ -2386,6 +2778,18 @@ declare namespace Office { /** * Provides information about the replaced node that raised the nodeReplaced event. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ interface NodeReplacedEventArgs { /** @@ -2410,19 +2814,24 @@ declare namespace Office { * Represents a collection of CustomXmlPart objects. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
+ *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ interface CustomXmlParts { /** * Asynchronously adds a new custom XML part to a file. * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
- * * @param xml The XML to add to the newly created custom XML part. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2431,11 +2840,6 @@ declare namespace Office { /** * Asynchronously gets the specified custom XML part by its id. * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
- * * @param id The GUID of the custom XML part, including opening and closing braces. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2444,11 +2848,6 @@ declare namespace Office { /** * Asynchronously gets the specified custom XML part(s) by its namespace. * - * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
- * * @param ns The namespace URI. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2459,17 +2858,26 @@ declare namespace Office { * Represents a collection of CustomXmlPart objects. * * @remarks - *
HostsWord
+ * + *
Requirement SetsCustomXmlParts
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ interface CustomXmlPrefixMappings { /** * Asynchronously adds a prefix to namespace mapping to use when querying an item. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
- * * If no namespace is assigned to the requested prefix, the method returns an empty string (""). * * @param prefix Specifies the prefix to add to the prefix mapping list. Required. @@ -2482,9 +2890,6 @@ declare namespace Office { * Asynchronously gets the namespace mapped to the specified prefix. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * If the prefix already exists in the namespace manager, this method will overwrite the mapping of that prefix except when the prefix is one added or used by the data store internally, in which case it will return an error. * @@ -2497,9 +2902,6 @@ declare namespace Office { * Asynchronously gets the prefix for the specified namespace. * * @remarks - * - * - *
HostsWord
Requirement SetsCustomXmlParts
* * If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in the namespace manager, the method returns the first prefix that matches the supplied namespace. * @@ -2520,48 +2922,126 @@ declare namespace Office { * Gets an object that provides access to the bindings defined in the document. * * @remarks - *
HostsAccess, Excel, Word
- * * You don't instantiate the Document object directly in your script. To call members of the Document object to interact with the current document or worksheet, use `Office.context.document` in your script. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
PowerPoint Y Y Y
Word Y Y Y
*/ bindings: Bindings; /** * Gets an object that represents the custom XML parts in the document. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Word Y Y
*/ customXmlParts: CustomXmlParts; /** * Gets the mode the document is in. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
*/ mode: DocumentMode; /** * Gets an object that represents the saved custom settings of the content or task pane add-in for the current document. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
*/ settings: Settings; /** * Gets the URL of the document that the host application currently has open. Returns null if the URL is unavailable. * * @remarks - *
HostsWord
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y
Word Y Y Y
*/ url: string; /** * Adds an event handler for a Document object event. * * @remarks - * - * - *
HostsExcel, PowerPoint, Project, Word
Requirement SetsDocumentEvents
+ *
Requirement SetsDocumentEvents
* * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Project Y
Word Y Y Y
* * @param eventType For a Document object event, the eventType parameter can be specified as `Office.EventType.Document.SelectionChanged` or `Office.EventType.Document.ActiveViewChanged`, or the corresponding text value of this enumeration. * @param handler The event handler function to add, whose only parameter is of type {@link Office.DocumentSelectionChangedEventArgs}. Required. @@ -2573,11 +3053,23 @@ declare namespace Office { * Returns the state of the current view of the presentation (edit or read). * * @remarks - * - * - *
HostsExcel, PowerPoint, Word
Requirement SetsActiveView
+ *
Requirement SetsActiveView
* * Can trigger an event when the view changes. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2587,9 +3079,7 @@ declare namespace Office { * Returns the entire document file in slices of up to 4194304 bytes (4 MB). For add-ins for iOS, file slice is supported up to 65536 (64 KB). Note that specifying file slice size of above permitted limit will result in an "Internal Error" failure. * * @remarks - * - * - *
HostsExcel, PowerPoint, Word
Requirement SetsFile
+ *
Requirement SetsFile
* * For add-ins running in Office host applications other than Office for iOS, the getFileAsync method supports getting files in slices of up to 4194304 bytes (4 MB). For add-ins running in Office for iOS apps, the getFileAsync method supports getting files in slices of up to 65536 (64 KB). * @@ -2602,6 +3092,20 @@ declare namespace Office { * Word on Windows desktop, Word on Mac, and Word Online: `Office.FileType.Compressed`, `Office.FileType.Pdf`, `Office.FileType.Text` * * Word on iPad: `Office.FileType.Compressed`, `Office.FileType.Text` + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
PowerPoint Y Y Y
Word Y Y
* * @param fileType The format in which the file will be returned * @param options Provides options for setting the size of slices that the document will be divided into. @@ -2612,11 +3116,23 @@ declare namespace Office { * Gets file properties of the current document. * * @remarks - * - * - *
HostsExcel, PowerPoint, Word
Requirement Setsnot in a set
+ *
Requirement SetsNot in a set
* * You get the file's URL with the url property `asyncResult.value.url`. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -2626,9 +3142,7 @@ declare namespace Office { * Reads the data contained in the current selection in the document. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsSelection
+ *
Requirement SetsSelection
* * In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return the following information. * @@ -2688,6 +3202,22 @@ declare namespace Office { * * * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Project Y Y
Word Y Y
+ * * @param coercionType The type of data structure to return. See the remarks section for each host's supported coercion types. * * @param options Provides options for customizing what data is returned and how it is formatted. @@ -2699,9 +3229,7 @@ declare namespace Office { * Goes to the specified object or location in the document. * * @remarks - * - * - *
HostsExcel, PowerPoint, Word
Requirement Setsnot in a set
+ *
Requirement Setsnot in a set
* * PowerPoint doesn't support the goToByIdAsync method in Master Views. * @@ -2712,6 +3240,20 @@ declare namespace Office { * In PowerPoint: `Office.SelectionMode.Selected` selects the slide title or first textbox on the slide. `Office.SelectionMode.None` Doesn't select anything. * * In Word: `Office.SelectionMode.Selected` selects all content in the binding. Office.SelectionMode.None for text bindings, moves the cursor to the beginning of the text; for matrix bindings and table bindings, selects the first data cell (not first cell in header row for tables). + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
* * @param id The identifier of the object or location to go to. * @param goToType The type of the location to go to. @@ -2723,9 +3265,21 @@ declare namespace Office { * Removes an event handler for the specified event type. * * @remarks - * - * - *
HostsExcel, PowerPoint, Project, Word
Requirement SetsDocumentEvents
+ *
Requirement SetsDocumentEvents
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
* * @param eventType The event type. For document can be 'Document.SelectionChanged' or 'Document.ActiveViewChanged'. * @param options Provides options to determine which event handler or handlers are removed. @@ -2736,9 +3290,7 @@ declare namespace Office { * Writes the specified data into the current selection. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Project, Word, Word Online
Requirement SetsSelection
+ *
Requirement SetsSelection
* * **Application-specific behaviors** * @@ -2800,6 +3352,21 @@ declare namespace Office { * * * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * * @param data The data to be set. Either a string or {@link Office.CoercionType} value, 2d array or TableData object. * * If the value passed for `data` is: @@ -2823,6 +3390,20 @@ declare namespace Office { * @param fieldId Project level fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getProjectFieldAsync(fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2831,24 +3412,80 @@ declare namespace Office { * @param fieldId Resource Fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getResourceFieldAsync(resourceId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Resource's Id. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedResourceAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected Task's Id. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the current selected View Type (Ex. Gantt) and View Name. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getSelectedViewAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2856,6 +3493,20 @@ declare namespace Office { * @param taskId Either a string or value of the Task Id. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskAsync(taskId: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2864,12 +3515,40 @@ declare namespace Office { * @param fieldId Task Fields. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskFieldAsync(taskId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Project documents only. Get the WSS Url and list name for the Tasks List, the MPP is synced too. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getWSSUrlAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2879,6 +3558,20 @@ declare namespace Office { * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getMaxResourceIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2888,6 +3581,20 @@ declare namespace Office { * * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getMaxTaskIndexAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2898,6 +3605,20 @@ declare namespace Office { * @param resourceIndex The index of the resource in the collection of resources for the project. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getResourceByIndexAsync(resourceIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2908,6 +3629,20 @@ declare namespace Office { * @param taskIndex The index of the task in the collection of tasks for the project. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ getTaskByIndexAsync(taskIndex: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2920,6 +3655,20 @@ declare namespace Office { * @param fieldValue Value of the target field. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ setResourceFieldAsync(resourceId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** @@ -2932,6 +3681,20 @@ declare namespace Office { * @param fieldValue Value of the target field. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. + * + * @remarks + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser)
Project Y
*/ setTaskFieldAsync(taskId: string, fieldId: number, fieldValue: string | number | boolean | object, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; } @@ -2952,24 +3715,31 @@ declare namespace Office { * Represents the document file associated with an Office Add-in. * * @remarks - *
HostsPowerPoint, Word
- * * Access the File object with the AsyncResult.value property in the callback function passed to the Document.getFileAsync method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
*/ interface File { /** * Gets the document file size in bytes. * * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
+ *
Requirement SetsFile
*/ size: number; /** * Gets the number of slices into which the file is divided. - * @remarks - *
HostsPowerPoint, Word
*/ sliceCount: number; /** @@ -2977,9 +3747,7 @@ declare namespace Office { * * @remarks * - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
+ *
Requirement SetsFile
* * No more than two documents are allowed to be in memory; otherwise the Document.getFileAsync operation will fail. Use the File.closeAsync method to close the file when you are finished working with it. * @@ -3015,9 +3783,7 @@ declare namespace Office { * Returns the specified slice. * * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
+ *
Requirement SetsFile
* * In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following information. * @@ -3059,11 +3825,22 @@ declare namespace Office { * Represents a binding in two dimensions of rows and columns. * * @remarks - * - * - *
HostsExcel, Word
Requirement SetsMatrixBindings
+ *
Requirement SetsMatrixBindings
* * The MatrixBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the Binding object. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
*/ interface MatrixBinding extends Binding { /** @@ -3109,9 +3886,7 @@ declare namespace Office { * * @remarks * - * - * - *
HostsExcel
Requirement SetsSettings
+ *
Requirement SetsSettings
* * You can add multiple event handlers for the specified eventType as long as the name of each event handler function is unique. * @@ -3142,15 +3917,40 @@ declare namespace Office { * A user-defined item of any type that is returned in the AsyncResult object without being altered. * * + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y
*/ addHandlerAsync(eventType: Office.EventType, handler: any, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult) => void): void; /** * Retrieves the specified setting. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Word
Requirement SetsSettings
+ *
Requirement SetsSettings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
* * @param settingName The case-sensitive name of the setting to retrieve. * @returns An object that has property names mapped to JSON serialized values. @@ -3161,9 +3961,7 @@ declare namespace Office { * * @remarks * - * - * - *
HostsAccess, Excel, PowerPoint, Word
Requirement SetsSettings
+ *
Requirement SetsSettings
* * This method is useful in Excel, Word, and PowerPoint coauthoring scenarios when multiple instances of the same add-in are working against the same document. * Because each add-in is working against an in-memory copy of the settings loaded from the document at the time the user opened it, the settings values used by each user can get out of sync. @@ -3194,6 +3992,21 @@ declare namespace Office { * A user-defined item of any type that is returned in the AsyncResult object without being altered. * * + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
* * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter. */ @@ -3204,11 +4017,24 @@ declare namespace Office { * Important: Be aware that the Settings.remove method affects only the in-memory copy of the settings property bag. To persist the removal of the specified setting in the document, at some point after calling the Settings.remove method and before the add-in is closed, you must call the Settings.saveAsync method. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Word
Requirement SetsSettings
+ *
Requirement SetsSettings
* * null is a valid value for a setting. Therefore, assigning null to the setting will not remove it from the settings property bag. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y
* * @param settingName The case-sensitive name of the setting to remove. */ @@ -3217,26 +4043,38 @@ declare namespace Office { * Removes an event handler for the settingsChanged event. * * @remarks + * + *
Requirement SetsSettings
+ * * If the optional handler parameter is omitted when calling the removeHandlerAsync method, all event handlers for the specified eventType will be removed. - * - * - * - *
HostsAccess, Excel, PowerPoint
Requirement SetsSettings
+ * + * When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter. + * + * In the callback function passed to the removeHandlerAsync method, you can use the properties of the AsyncResult object to return the following information. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
* * @param eventType Specifies the type of event to remove. Required. * @param options Provides options to determine which event handler or handlers are removed. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. - * @remarks - * When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter. - * In the callback function passed to the removeHandlerAsync method, you can use the properties of the AsyncResult object to return the following information. */ removeHandlerAsync(eventType: Office.EventType, options?: RemoveHandlerOptions, callback?: (result: AsyncResult) => void): void; /** * Persists the in-memory copy of the settings property bag in the document. * - * @remarks - *
HostsAccess, Excel, PowerPoint, Word
- * + * @remarks * Any settings previously saved by an add-in are loaded when it is initialized, so during the lifetime of the session you can just use the set and get methods to work with the in-memory copy of the settings property bag. * When you want to persist the settings so that they are available the next time the add-in is used, use the saveAsync method. * @@ -3266,6 +4104,21 @@ declare namespace Office { * * * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * * @param options Provides options for saving settings. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter to return the following information. */ @@ -3277,12 +4130,26 @@ declare namespace Office { * To make sure that additions or changes to settings will be available to your add-in the next time the document is opened, at some point after calling the Settings.set method and before the add-in is closed, you must call the Settings.saveAsync method to persist settings in the document. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Word
Requirement SetsSettings
+ *
Requirement SetsSettings
* * The set method creates a new setting of the specified name if it does not already exist, or sets an existing setting of the specified name in the in-memory copy of the settings property bag. * After you call the Settings.saveAsync method, the value is stored in the document as the serialized JSON representation of its data type. A maximum of 2MB is available for the settings of each add-in. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
PowerPoint Y Y Y
Word Y Y Y
+ * * @param settingName The case-sensitive name of the setting to set or create. * @param value Specifies the value to be stored. */ @@ -3292,84 +4159,97 @@ declare namespace Office { * Represents a slice of a document file. * * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
+ *
Requirement SetsFile
* * The Slice object is accessed with the File.getSliceAsync method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
PowerPoint Y Y Y
Word Y Y Y
*/ interface Slice { /** * Gets the raw data of the file slice in `Office.FileType.Text` ("text") or `Office.FileType.Compressed` ("compressed") format as specified by the fileType parameter of the call to the Document.getFileAsync method. * * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
* * Files in the "compressed" format will return a byte array that can be transformed to a base64-encoded string if required. */ data: any; /** * Gets the zero-based index of the file slice. - * - * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
*/ index: number; /** * Gets the size of the slice in bytes. - * - * @remarks - * - * - *
HostsPowerPoint, Word
Requirement SetsFile
*/ size: number; } /** - * Represents a binding in two dimensions of rows and columns, optionally with headers. - * - * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsTableBindings
- * - * The TableBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the Binding object. - * - * For Excel, note that after you establish a table binding in Excel, each new row a user adds to the table is automatically included in the binding and rowCount increases. - */ + * Represents a binding in two dimensions of rows and columns, optionally with headers. + * + * @remarks + *
Requirement SetsTableBindings
+ * + * The TableBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the Binding object. + * + * For Excel, note that after you establish a table binding in Excel, each new row a user adds to the table is automatically included in the binding and rowCount increases. + */ interface TableBinding extends Binding { /** * Gets the number of columns in the TableBinding, as an integer value. * * @remarks - * - * - *
HostsAccess, Excel,Word
Requirement SetsTableBindings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ columnCount: number; /** * True, if the table has headers; otherwise false. * * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsTableBindings
+ * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ hasHeaders: boolean; /** * Gets the number of rows in the TableBinding, as an integer value. * * @remarks - * - * - *
HostsAccess, Excel,Word
Requirement SetsTableBindings
- * * When you insert an empty table by selecting a single row in Excel 2013 and Excel Online (using Table on the Insert tab), both Office host applications create a single row of headers followed by a single blank row. However, if your add-in's script creates a binding for this newly inserted table (for example, by using the addFromSelectionAsync method), and then checks the value of the rowCount property, the value returned will differ depending whether the spreadsheet is open in Excel 2013 or Excel Online. - * - In Excel on the desktop, rowCount will return 0 (the blank row following the headers is not counted). * * - In Excel Online, rowCount will return 1 (the blank row following the headers is counted). @@ -3377,15 +4257,26 @@ declare namespace Office { * You can work around this difference in your script by checking if rowCount == 1, and if so, then checking if the row contains all empty strings. * * In content add-ins for Access, for performance reasons the rowCount property always returns -1. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this property is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this property. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
*/ rowCount: number; /** * Adds the specified data to the table as additional columns. * * @remarks - * - * - *
HostsExcel, Word
Requirement SetsTableBindings
* * To add one or more columns specifying the values of the data and headers, pass a TableData object as the data parameter. To add one or more columns specifying only the data, pass an array of arrays ("matrix") as the data parameter. * @@ -3398,6 +4289,19 @@ declare namespace Office { * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel Online: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in a single call to this method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
* * @param tableData An array of arrays ("matrix") or a TableData object that contains one or more columns of data to add to the table. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3408,9 +4312,6 @@ declare namespace Office { * Adds the specified data to the table as additional rows. * * @remarks - * - * - *
HostsAccess, Excel, Word
Requirement SetsTableBindings
* * To add one or more columns specifying the values of the data and headers, pass a TableData object as the data parameter. To add one or more columns specifying only the data, pass an array of arrays ("matrix") as the data parameter. * @@ -3423,6 +4324,20 @@ declare namespace Office { * - If you pass a TableData object as the data argument, the number of header rows must match that of the table being updated. * * Additional remark for Excel Online: The total number of cells in the TableData object passed to the data parameter can't exceed 20,000 in a single call to this method. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param rows An array of arrays ("matrix") or a TableData object that contains one or more rows of data to add to the table. Required. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3433,11 +4348,22 @@ declare namespace Office { * Deletes all non-header rows and their values in the table, shifting appropriately for the host application. * * @remarks - * - * - *
HostsAccess, Excel, Word
Requirement SetsTableBindings
* * In Excel, if the table has no header row, this method will delete the table itself. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Access Y
Excel Y Y Y
Word Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -3447,11 +4373,19 @@ declare namespace Office { * Clears formatting on the bound table. * * @remarks - * - * - *
HostsExcel
Requirement SetsNot in a set
- * * See {@link https://docs.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-tables#format-a-table | Format tables in add-ins for Excel} for more information. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
* * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. * @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. @@ -3469,9 +4403,6 @@ declare namespace Office { * Sets formatting on specified items and data in the table. * * @remarks - * - * - *
HostsExcel
Requirement SetsNot in a set
* * **Specifying the cellFormat parameter** * @@ -3580,6 +4511,18 @@ declare namespace Office { * A user-defined item of any type that is returned in the AsyncResult object without being altered. * * + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
* * @param cellFormat An array that contains one or more JavaScript objects that specify which cells to target and the formatting to apply to them. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3618,6 +4561,18 @@ declare namespace Office { * A user-defined item of any type that is returned in the AsyncResult object without being altered. * * + * + * **Support details** + * + * A capital Y in the following matrix indicates that this method is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this method. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
* * @param tableOptions An object literal containing a list of property name-value pairs that define the table options to apply. * @param options Provides an option for preserving context data of any type, unchanged, for use in a callback. @@ -3705,15 +4660,26 @@ declare namespace Office { Headers } /** - * Represents a bound text selection in the document. - * - * @remarks - * - * - *
HostsAccess, Excel, PowerPoint, Project, Word
Requirement SetsTextBindings
- * - * The TextBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the {@link Office.Binding} object. It does not implement any additional properties or methods of its own. - */ + * Represents a bound text selection in the document. + * + * @remarks + *
Requirement SetsTextBindings
+ * + * The TextBinding object inherits the id property, type property, getDataAsync method, and setDataAsync method from the {@link Office.Binding} object. It does not implement any additional properties or methods of its own. + * + * **Support details** + * + * A capital Y in the following matrix indicates that this interface is supported in the corresponding Office host application. An empty cell indicates that the Office host application doesn't support this interface. + * + * For more information about Office host application and server requirements, see {@link https://docs.microsoft.com/office/dev/add-ins/concepts/requirements-for-running-office-add-ins | Requirements for running Office Add-ins}. + * + * *Supported hosts, by platform* + * + * + * + * + *
Office for Windows desktop Office Online (in browser) Office for iPad
Excel Y Y Y
Word Y Y Y
+ */ interface TextBinding extends Binding { } /** * Specifies the project fields that are available as a parameter for the {@link Office.Document | Document}.getProjectFieldAsync method. From 69f6358f3cc5de97fe3f475187553cc2a359c3f0 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 6 Aug 2018 11:32:15 -0700 Subject: [PATCH 16/49] dom4: ElementTraversal is now part of ParentNode (#27769) --- types/dom4/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/dom4/index.d.ts b/types/dom4/index.d.ts index 90c9c29966..47a7080a0c 100644 --- a/types/dom4/index.d.ts +++ b/types/dom4/index.d.ts @@ -60,11 +60,11 @@ interface Element extends ParentNode { matches(selectors: string): boolean; } -interface Elements extends ElementTraversal, ParentNode, Array { +interface Elements extends ParentNode, Array { } -interface Document extends ElementTraversal, ParentNode { +interface Document extends ParentNode { } -interface DocumentFragment extends ElementTraversal, ParentNode { +interface DocumentFragment extends ParentNode { } From c1b7e33e7f3e99d0b74b9ac8fa4a8610e81a2b2a Mon Sep 17 00:00:00 2001 From: denisname Date: Mon, 6 Aug 2018 20:33:00 +0200 Subject: [PATCH 17/49] d3-quadtree: JsDoc, strictNullChecks and TS 2.3 (#27648) * Add JsDoc and use default generics * Activate strictNullChecks and use ExpectError * Fix most linting trailing whitespace TypeScript Version: 2.3 * Fix void-return * Add length property to internal and leaf nodes --- types/d3-quadtree/d3-quadtree-tests.ts | 36 +++-- types/d3-quadtree/index.d.ts | 175 +++++++++++++++++++++++-- types/d3-quadtree/tsconfig.json | 2 +- 3 files changed, 192 insertions(+), 21 deletions(-) diff --git a/types/d3-quadtree/d3-quadtree-tests.ts b/types/d3-quadtree/d3-quadtree-tests.ts index eda00fe130..8180bc0f44 100644 --- a/types/d3-quadtree/d3-quadtree-tests.ts +++ b/types/d3-quadtree/d3-quadtree-tests.ts @@ -13,19 +13,21 @@ import * as d3Quadtree from 'd3-quadtree'; // --------------------------------------------------------------------------- // custom type guard -function isLeaf(a: any): a is d3Quadtree.QuadtreeLeaf { - return a.data !== undefined; +function isLeaf(a: d3Quadtree.QuadtreeInternalNode | d3Quadtree.QuadtreeLeaf): a is d3Quadtree.QuadtreeLeaf { + return a.length === undefined; } let num: number; -let extent: [[number, number], [number, number]]; +let num4: 4; +let undef: undefined; +let extent: [[number, number], [number, number]] | undefined; interface TestDatum { x: number; y: number; } -let testDatum: TestDatum; +let testDatum: TestDatum | undefined; let testData: TestDatum[] = [ { x: 10, y: 20 }, @@ -83,7 +85,6 @@ quadtree = d3Quadtree.quadtree(testData); // explicitly typed to Test // test without data quadtree = d3Quadtree.quadtree(); -// quadtree = d3Quadtree.quadtree(); fails, wrong underlying data type // Configure Quadtree ======================================================== @@ -111,12 +112,14 @@ quadtree = quadtree.cover(50, 90); // add(...) ------------------------------------------------------------------ quadtree = quadtree.add({ x: 35, y: 35 }); -// quadtree = quadtree.add({x: 35}); // fails, incompatible data type +// $ExpectError +quadtree = quadtree.add({x: 35}); // fails, incompatible data type // addAll(...) --------------------------------------------------------------- quadtree = quadtree.addAll(testData); -// quadtree = quadtree.addAll([{x: 35}, {x: 55, y: 13}]); // fails, incompatible data type +// $ExpectError +quadtree = quadtree.addAll([{x: 35}, {x: 55, y: 13}]); // fails, incompatible data type // remove(...) --------------------------------------------------------------- @@ -191,9 +194,10 @@ quadtree = quadtree.visit((node, x0, y0, x1, y1) => { } }); -// quadtree = quadtree.visit(function (node, x0, y0, x1, y1) { -// return 10; // fails wrong return type -// }); +// $ExpectError +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { + return 10; // fails wrong return type +}); // visitAfter() --------------------------------------------------------------- @@ -232,3 +236,15 @@ quadNode = internalNode[0]; quadNode = internalNode[1]; quadNode = internalNode[2]; quadNode = internalNode[3]; + +num = internalNode.length; +num4 = internalNode.length; + +quadtree = quadtree.visit((node, x0, y0, x1, y1) => { + if (isLeaf(node)) { + undef = node.length; + } else { + num = node.length; + num4 = node.length; + } +}); diff --git a/types/d3-quadtree/index.d.ts b/types/d3-quadtree/index.d.ts index 8128c9e306..8e66ba411c 100644 --- a/types/d3-quadtree/index.d.ts +++ b/types/d3-quadtree/index.d.ts @@ -1,17 +1,34 @@ // Type definitions for D3JS d3-quadtree module 1.0 // Project: https://github.com/d3/d3-quadtree/ -// Definitions by: Tom Wanzek , Alex Ford , Boris Yankov +// Definitions by: Tom Wanzek +// Alex Ford +// Boris Yankov +// denisname // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 -// Last module patch version validated against: 1.0.1 +// Last module patch version validated against: 1.0.3 /** * Leaf node of the quadtree. */ export interface QuadtreeLeaf { + /** + * The data associated with this point, as passed to quadtree.add. + */ data: T; + + /** + * The next datum in this leaf, if any. + */ next?: QuadtreeLeaf; + + /** + * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. + */ + length?: undefined; } + /** * Internal nodes of the quadtree are represented as four-element arrays in left-to-right, top-to-bottom order: * @@ -22,32 +39,170 @@ export interface QuadtreeLeaf { * * A child quadrant may be undefined if it is empty. */ -export interface QuadtreeInternalNode extends Array | QuadtreeLeaf | undefined> { } +export interface QuadtreeInternalNode extends Array | QuadtreeLeaf | undefined> { + /** + * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. + */ + length: 4; +} export interface Quadtree { + /** + * Returns the current x-accessor, which defaults to: `x(d) => d[0]`. + */ x(): (d: T) => number; + /** + * Sets the current x-coordinate accessor and returns the quadtree. + * The x-accessors must be consistent, returning the same value given the same input. + * + * @param x The x-coordinate accessor. + */ x(x: (d: T) => number): this; + + /** + * Returns the current y-accessor, which defaults to: `y(d) => d[1]`. + */ y(): (d: T) => number; + /** + * Sets the current y-coordinate accessor and returns the quadtree. + * The y-accessors must be consistent, returning the same value given the same input. + * + * @param y The y-coordinate accessor. + */ y(y: (d: T) => number): this; + + /** + * Returns the quadtree's current extent `[[x0, y0], [x1, y1]]`, + * where `x0` and `y0` are the inclusive lower bounds and `x1` and `y1` are the inclusive upper bounds, + * or `undefined` if the quadtree has no extent. + */ extent(): [[number, number], [number, number]] | undefined; + /** + * Expands the quadtree to cover the specified points `[[x0, y0], [x1, y1]]` and returns the quadtree. + * The extent may also be expanded by calling `quadtree.cover` or `quadtree.add`. + * + * @param extend The specified points to cover. + */ extent(extend: [[number, number], [number, number]]): this; + + /** + * Expands the quadtree to cover the specified point ⟨x,y⟩, and returns the quadtree. + * * If the quadtree’s extent already covers the specified point, this method does nothing. + * * If the quadtree has an extent, the extent is repeatedly doubled to cover the specified point, wrapping the root node as necessary. + * * If the quadtree is empty, the extent is initialized to the extent `[[⌊x⌋, ⌊y⌋], [⌈x⌉, ⌈y⌉]]`. + * Rounding is necessary such that if the extent is later doubled, the boundaries of existing quadrants do not change due to floating point error. + * + * @param x The x-coordinate for the specified point to cover. + * @param y The y-coordinate for the specified point to cover. + */ cover(x: number, y: number): this; + + /** + * Adds the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If the new point is outside the current extent of the quadtree, the quadtree is automatically expanded to cover the new point. + * + * @param datum The specified datum to add. + */ add(datum: T): this; + + /** + * Adds the specified array of data to the quadtree, deriving each element’s coordinates ⟨x,y⟩ using the current x- and y-accessors, and return this quadtree. + * This is approximately equivalent to calling quadtree.add repeatedly. + * However, this method results in a more compact quadtree because the extent of the data is computed first before adding the data. + * + * @param data The specified array of data to add. + */ addAll(data: T[]): this; + + /** + * Removes the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If the specified datum does not exist in this quadtree, this method does nothing. + * + * @param datum The specified datum to remove. + */ remove(datum: T): this; + + /** + * Removes the specified data to the quadtree, deriving their coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. + * If a specified datum does not exist in this quadtree, it is ignored. + * + * @param data The specified array of data to remove. + */ removeAll(data: T[]): this; + + /** + * Returns a copy of the quadtree. All nodes in the returned quadtree are identical copies of the corresponding node in the quadtree; + * however, any data in the quadtree is shared by reference and not copied. + */ copy(): Quadtree; + + /** + * Returns the root node of the quadtree. + */ root(): QuadtreeInternalNode | QuadtreeLeaf; + + /** + * Returns an array of all data in the quadtree. + */ data(): T[]; + + /** + * Returns the total number of data in the quadtree. + */ size(): number; + + /** + * Returns the datum closest to the position ⟨x,y⟩ with the given search radius. If radius is not specified, it defaults to infinity. + * If there is no datum within the search area, returns undefined. + * + * @param x The x-coordinate for the search position. + * @param y The y-coordinate for the search position. + * @param radius The optional search radius. + */ find(x: number, y: number, radius?: number): T | undefined; - // TODO: Review below, when validating to strictNullChecks. - // tslint:disable-next-line:void-return - visit(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => (void | boolean)): this; + + /** + * Visits each node in the quadtree in pre-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, + * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. + * + * If the callback returns true for a given node, then the children of that node are not visited; otherwise, all child nodes are visited. + * This can be used to quickly visit only parts of the tree. + * Note, however, that child quadrants are always visited in sibling order: top-left, top-right, bottom-left, bottom-right. + * In cases such as search, visiting siblings in a specific order may be faster. + * + * @param callback The callback invoked for each node. + */ + visit(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => void | boolean): this; + + /** + * Visits each node in the quadtree in post-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, + * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. + * + * @param callback The callback invoked for each node. + */ visitAfter(callback: (node: QuadtreeInternalNode | QuadtreeLeaf, x0: number, y0: number, x1: number, y1: number) => void): this; } -export function quadtree(): Quadtree<[number, number]>; -export function quadtree(data: Array<[number, number]>): Quadtree<[number, number]>; -export function quadtree(): Quadtree; -export function quadtree(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree; +/** + * Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. + * + * The generic refers to the data type. If omitted, the default setting assumes that, + * the data used with the quadtree are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. + * When using another type, The x- and y-accessors must be specified. + */ +export function quadtree(): Quadtree; +/** + * Creates a new quadtree with the specified array of data. + * If `x` and `y` are also specified, sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree, otherwise use the default x- and y-accessors. + * + * The generic refers to the data type. If omitted, the default setting assumes that, + * the data used with the quadtree are two-element arrays. + * The first element corresponds to the x-dimension, the second to the y-dimension. + * When using another type, The x- and y-accessors must be specified. + * + * @param data The specified array of data to add. + * @param x The x-coordinate accessor. + * @param y The y-coordinate accessor. + */ +export function quadtree(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree; diff --git a/types/d3-quadtree/tsconfig.json b/types/d3-quadtree/tsconfig.json index cbbb70a658..0f4239c3a6 100644 --- a/types/d3-quadtree/tsconfig.json +++ b/types/d3-quadtree/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ From efe7ba616ab940736c49593a26825ec304ce8c24 Mon Sep 17 00:00:00 2001 From: "David J. Felix" Date: Mon, 6 Aug 2018 14:34:23 -0400 Subject: [PATCH 18/49] [@types/aws-lambda]: Add extractedFields optional field (#27670) * [@types/aws-lambda]: Add extractedFields optional field Added an undocumented optional field to a datatype which is sent zipped and base64 encoded. This field is only available if users select certain options when creating a subscription filter. You can see the field used if you create a subscription filter to elasticsearch and look at the source for the builtin lambda. I couldn't find any documentation for this field except in the terms "fields extracted" [here](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) and found some amazon code referencing it [here](https://github.com/amazon-archives/cloudwatch-logs-subscription-consumer/blob/master/src/test/resources/aws-lambda-log-example.json#L14). I nearly went insane tracking this down. * Narrow the type of extracted fields to string:string * Add test for extracted fields --- types/aws-lambda/aws-lambda-tests.ts | 1 + types/aws-lambda/index.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/aws-lambda/aws-lambda-tests.ts b/types/aws-lambda/aws-lambda-tests.ts index 12201df0ba..94575006ab 100644 --- a/types/aws-lambda/aws-lambda-tests.ts +++ b/types/aws-lambda/aws-lambda-tests.ts @@ -479,6 +479,7 @@ str = cloudwatchLogsDecodedData.messageType; str = cloudwatchLogsDecodedData.logEvents[0].id; num = cloudwatchLogsDecodedData.logEvents[0].timestamp; str = cloudwatchLogsDecodedData.logEvents[0].message; +str = cloudwatchLogsDecodedData.logEvents[0].extractedFields!["example"]; /* ClientContext */ clientContextClient = clientCtx.client; diff --git a/types/aws-lambda/index.d.ts b/types/aws-lambda/index.d.ts index db6a5a89f3..35d0b1d7a6 100644 --- a/types/aws-lambda/index.d.ts +++ b/types/aws-lambda/index.d.ts @@ -371,6 +371,7 @@ export interface CloudWatchLogsLogEvent { id: string; timestamp: number; message: string; + extractedFields?: {[key: string]: string}; } // Context From 953faadd23846ccf0206d306d41e2a74a1751032 Mon Sep 17 00:00:00 2001 From: golyalpha Date: Mon, 6 Aug 2018 20:34:49 +0200 Subject: [PATCH 19/49] Fix types in multiple classes [CesiumJS] (#27672) * Changes to mutiple classes Fixed types of PolygonGraphics - the type of fill property should be boolean - the types in constructor's options object should match the types of the class properties Fixed types of LabelGraphics - the font property is a string specifying the CSS font - see change notes to PolygonGraphics Fixed types of EllipseGraphics - the outlineColor prop is of type Color, not Property - see change notes to PolygonGraphics * Fixed types of LabelGraphics - fillColor type changed to Color - outlineColor type changed to Color - outlineWidth type changed to number * Fixed types in EllipseGraphics * Updated PolygonGraphics material property accepts both MaterialProperty and Color types * Updated types in EllipseGraphics --- types/cesium/index.d.ts | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts index 6c34023eae..3ea9745ebd 100644 --- a/types/cesium/index.d.ts +++ b/types/cesium/index.d.ts @@ -1935,15 +1935,15 @@ declare namespace Cesium { semiMinorAxis: Property; rotation: Property; show: Property; - material: MaterialProperty; + material: MaterialProperty | Color; height: Property; extrudedHeight: Property; granularity: Property; stRotation: Property; - fill: Property; - outline: Property; - outlineColor: Property; - outlineWidth: Property; + fill: boolean; + outline: boolean; + outlineColor: Color; + outlineWidth: number; numberOfVerticalLines: Property; constructor(options?: { semiMajorAxis?: number; @@ -1951,11 +1951,11 @@ declare namespace Cesium { height?: Property; extrudedHeight?: Property; show?: Property; - fill?: Property; - material?: MaterialProperty; - outline?: Property; - outlineColor?: Property; - outlineWidth?: Property; + fill?: boolean; + material?: MaterialProperty | Color + outline?: boolean; + outlineColor?: Color; + outlineWidth?: number; numberOfVerticalLines?: Property; rotation?: Property; stRotation?: Property; @@ -2207,11 +2207,11 @@ declare namespace Cesium { class LabelGraphics { definitionChanged: Event; text: Property; - font: Property; + font: string; style: Property; - fillColor: Property; - outlineColor: Property; - outlineWidth: Property; + fillColor: Color; + outlineColor: Color; + outlineWidth: number; horizontalOrigin: Property; verticalOrigin: Property; eyeOffset: Property; @@ -2222,11 +2222,11 @@ declare namespace Cesium { pixelOffsetScaleByDistance: Property; constructor(options?: { text?: Property; - font?: Property; + font?: string; style?: Property; - fillColor?: Property; - outlineColor?: Property; - outlineWidth?: Property; + fillColor?: Color; + outlineColor?: Color; + outlineWidth?: number; show?: Property; scale?: Property; horizontalOrigin?: Property; @@ -2362,14 +2362,14 @@ declare namespace Cesium { class PolygonGraphics { definitionChanged: Event; show: Property; - material: MaterialProperty; + material: MaterialProperty | Color; positions: Property; hierarchy: Property; height: Property; extrudedHeight: Property; granularity: Property; stRotation: Property; - fill: Property; + fill: boolean; outline: Property; outlineColor: Color; outlineWidth: Property; @@ -2379,10 +2379,10 @@ declare namespace Cesium { height?: number; extrudedHeight?: Property; show?: Property; - fill?: Property; - material?: MaterialProperty; + fill?: boolean; + material?: MaterialProperty | Color; outline?: boolean; - outlineColor?: Property; + outlineColor?: Color; outlineWidth?: number; stRotation?: Property; granularity?: Property; From 686d44924239f61e43e3dcecfdde32a6cf596802 Mon Sep 17 00:00:00 2001 From: Dmitriy Savchenko Date: Mon, 6 Aug 2018 21:35:26 +0300 Subject: [PATCH 20/49] [react-twitter-auth] update types (#27680) * Add missing props * Add more tests * Update types version * Fix specified type version for package * Fix specified version --- types/react-twitter-auth/index.d.ts | 4 ++ .../react-twitter-auth-tests.tsx | 54 ++++++++++++++----- 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/types/react-twitter-auth/index.d.ts b/types/react-twitter-auth/index.d.ts index cb3faf43fa..962693997c 100644 --- a/types/react-twitter-auth/index.d.ts +++ b/types/react-twitter-auth/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for react-twitter-auth 0.0 // Project: https://github.com/GenFirst/react-twitter-auth // Definitions by: Paul Fasola +// Dmytro Savchenko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -17,6 +18,9 @@ interface TwitterLoginProps { dialogHeight?: number; showIcon?: boolean; credentials?: "omit" | "same-origin" | "include"; + customHeaders?: HeadersInit; + children?: React.ReactNode; + forceLogin?: boolean; } declare var TwitterLogin: React.StatelessComponent; diff --git a/types/react-twitter-auth/react-twitter-auth-tests.tsx b/types/react-twitter-auth/react-twitter-auth-tests.tsx index 3bb1e8812d..abed3577d8 100644 --- a/types/react-twitter-auth/react-twitter-auth-tests.tsx +++ b/types/react-twitter-auth/react-twitter-auth-tests.tsx @@ -6,17 +6,47 @@ const ReactTwitterAuth: React.StatelessComponent = () => { function handleFailure(msg: string) {} return ( - +
+ + + + Login with twitter + +
); }; From e9adaf7d2b1f04e9f48e380a7e57881eb2c13548 Mon Sep 17 00:00:00 2001 From: Lindsey Date: Mon, 6 Aug 2018 11:42:33 -0700 Subject: [PATCH 21/49] [@types/highcharts] Fix type definition for responsive rules chartOptions (#27711) --- types/highcharts/index.d.ts | 2 +- types/highcharts/test/index.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index 07a06256e5..f24004fadb 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -3130,7 +3130,7 @@ declare namespace Highcharts { * chart's two series to be updated with respective options. * @since 5.0.0 */ - chartOptions?: ChartOptions; + chartOptions?: Options; /** * Under which conditions the rule applies. diff --git a/types/highcharts/test/index.ts b/types/highcharts/test/index.ts index d6eeaf8c52..1d6e921461 100644 --- a/types/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -2591,8 +2591,10 @@ function test_ResponsiveOptions() { const responsiveOptions: Highcharts.ResponsiveOptions = { rules: [ { - chartOptions: { - description: 'just a test' + chartOptions: { + chart: { + description: 'just a test' + } }, condition: { callback: () => { }, From 82e1fac4d05a0d52c6a66bdb9c30a1863daebce0 Mon Sep 17 00:00:00 2001 From: Seth Etter Date: Mon, 6 Aug 2018 13:44:18 -0500 Subject: [PATCH 22/49] Bring connect-mongo types in line with express-session 1.15 (#27713) --- types/connect-mongo/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/connect-mongo/index.d.ts b/types/connect-mongo/index.d.ts index cf3d5ddb3e..ee110ab6b0 100644 --- a/types/connect-mongo/index.d.ts +++ b/types/connect-mongo/index.d.ts @@ -104,11 +104,11 @@ declare namespace connectMongo { } export class MongoStore extends session.Store { - get: (sid: string, callback: (err: any, session: Express.Session) => void) => void; + get: (sid: string, callback: (err: any, session: Express.Session | null) => void) => void; set: (sid: string, session: Express.Session, callback?: (err: any) => void) => void; destroy: (sid: string, callback?: (err: any) => void) => void; length: (callback: (err: any, length: number) => void) => void; - clear: (callback?: (err: any) => void) => void; + clear: (callback?: (err?: any) => void) => void; touch: (sid: string, session: Express.Session, callback?: (err: any) => void) => void; } } From a08595ef0035cc3e3aaef017dca093b03a912c87 Mon Sep 17 00:00:00 2001 From: ocboogie Date: Mon, 6 Aug 2018 11:45:57 -0700 Subject: [PATCH 23/49] Update prettyMs to 3.2 (#27721) Missing option keepDecimalsOnWholeSeconds --- types/pretty-ms/index.d.ts | 4 +++- types/pretty-ms/pretty-ms-tests.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/types/pretty-ms/index.d.ts b/types/pretty-ms/index.d.ts index e23b26826b..b1e151cd65 100644 --- a/types/pretty-ms/index.d.ts +++ b/types/pretty-ms/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for pretty-ms 3.0 +// Type definitions for pretty-ms 3.2 // Project: https://github.com/sindresorhus/pretty-ms#readme // Definitions by: BendingBender +// ocboogie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped export = prettyMs; @@ -11,6 +12,7 @@ declare namespace prettyMs { interface PrettyMsOptions { secDecimalDigits?: number; msDecimalDigits?: number; + keepDecimalsOnWholeSeconds?: boolean; compact?: boolean; verbose?: boolean; } diff --git a/types/pretty-ms/pretty-ms-tests.ts b/types/pretty-ms/pretty-ms-tests.ts index 14bff61304..ae5e8120b2 100644 --- a/types/pretty-ms/pretty-ms-tests.ts +++ b/types/pretty-ms/pretty-ms-tests.ts @@ -4,6 +4,7 @@ let str: string; str = prettyMs(133); str = prettyMs(1337, {compact: true}); str = prettyMs(1335669000, {verbose: true}); +str = prettyMs(1335669000, {keepDecimalsOnWholeSeconds: true}); str = prettyMs(1335669000, {secDecimalDigits: 1}); str = prettyMs(1335669000, {msDecimalDigits: 2}); str = prettyMs(new Date(2014, 0, 1, 10, 40).getTime() - new Date(2014, 0, 1, 10, 5).getTime()); From d81b7ef2d511503cf2d96ab338cd28c1f9164cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Sm=C3=B3=C5=82ka?= Date: Mon, 6 Aug 2018 20:47:02 +0200 Subject: [PATCH 24/49] kendo-ui: add skip() function to DataSource (#27722) * kendo-ui: DataSource skip() * fix definition, missing semicolon --- types/kendo-ui/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/kendo-ui/index.d.ts b/types/kendo-ui/index.d.ts index dc9f7d43f0..d9df1942c3 100644 --- a/types/kendo-ui/index.d.ts +++ b/types/kendo-ui/index.d.ts @@ -1081,6 +1081,7 @@ declare namespace kendo.data { query(options?: any): JQueryPromise; read(data?: any): JQueryPromise; remove(model: kendo.data.ObservableObject): void; + skip(): number; sort(sort: DataSourceSortItem): void; sort(sort: DataSourceSortItem[]): void; sort(): DataSourceSortItem[]; From 6d4581efc2185408563229dddf7bd2fd2bb152d3 Mon Sep 17 00:00:00 2001 From: Michael Su Date: Tue, 7 Aug 2018 04:49:31 +1000 Subject: [PATCH 25/49] Fix signature of Picker.setCallback() (#27746) --- types/google.picker/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/google.picker/index.d.ts b/types/google.picker/index.d.ts index b5fc91404d..9a0c95f920 100644 --- a/types/google.picker/index.d.ts +++ b/types/google.picker/index.d.ts @@ -83,7 +83,7 @@ declare namespace google { */ export interface Picker { isVisible(): boolean; - setCallback():Picker; + setCallback(method:Function):Picker; setRelayUrl(url:string):Picker; setVisible(visible:boolean):Picker; } From c1c132972d8db7e9d3a2b095fa1eddd746a1d5dc Mon Sep 17 00:00:00 2001 From: Terry Mun Date: Mon, 6 Aug 2018 20:50:12 +0200 Subject: [PATCH 26/49] [@types/vimeo__player] Updating typings to match Vimeo's player.js v2.6.3 (#27749) * Updated typings to match Vimeo's player.js v2.6.3, updated tests to reflect new methods, properties, and events * Cleanup of unused boilerplate lines * setPlaybackRate may return RangeError * options argument in constructor is optional --- types/vimeo__player/index.d.ts | 19 +++++--- types/vimeo__player/vimeo__player-tests.ts | 50 +++++++++++++++++++++- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/types/vimeo__player/index.d.ts b/types/vimeo__player/index.d.ts index d5f224975e..6fac1db7d9 100755 --- a/types/vimeo__player/index.d.ts +++ b/types/vimeo__player/index.d.ts @@ -1,13 +1,11 @@ -// Type definitions for @vimeo/player 2.0 +// Type definitions for @vimeo/player 2.6.3 // Project: https://github.com/vimeo/player.js // Definitions by: Denis Yılmaz // Felix Albert // Tim Chen +// Terry Mun // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export function myMethod(a: string): string; -export function myOtherMethod(a: number): number; - export type CallbackFunction = (...args: any[]) => any; export interface Error {name: string; message: string; method: string; } @@ -22,11 +20,12 @@ export interface InvalidCuePoint extends Error {name: "InvalidCuePoint"; message export interface RangeError extends Error {name: "RangeError"; message: string; method: string; } export interface TypeError extends Error {name: "TypeError"; message: string; method: string; } -export type EventName = "play" | "pause" | "ended" | "timeupdate" | "progress" | "seeked" | "texttrackchange" | "cuechange" | "cuepoint" | "volumechange" | "error" | "loaded" | string; +export type EventName = "play" | "pause" | "ended" | "timeupdate" | "progress" | "seeked" | "texttrackchange" | + "cuechange" | "cuepoint" | "volumechange" | "playbackratechange" | "bufferstart" | "bufferend" | "error" | "loaded" | string; export type EventCallback = (data: any) => any; export class Player { - constructor(element: HTMLIFrameElement|HTMLElement|string, options: Options); + constructor(element: HTMLIFrameElement|HTMLElement|string, options?: Options); on(event: EventName, callback: EventCallback): void; off(event: EventName, callback?: EventCallback): void; @@ -51,6 +50,8 @@ export class Player { getLoop(): VimeoPromise; setLoop(loop: boolean): VimeoPromise; getPaused(): VimeoPromise; + getPlaybackRate(): VimeoPromise; + setPlaybackRate(playbackRate: number): VimeoPromise; getTextTracks(): VimeoPromise; getVideoEmbedCode(): VimeoPromise; getVideoId(): VimeoPromise; @@ -85,14 +86,20 @@ export interface Options { url?: string; autopause?: boolean; autoplay?: boolean; + background?: boolean; byline?: boolean; color?: string; height?: number; loop?: boolean; maxheight?: number; maxwidth?: number; + muted?: boolean; + playsinline?: boolean; portrait?: boolean; + responsive?: boolean; + speed?: boolean; title?: boolean; + transparent?: boolean; width?: number; } diff --git a/types/vimeo__player/vimeo__player-tests.ts b/types/vimeo__player/vimeo__player-tests.ts index bf5a637762..0dbba1a3a8 100644 --- a/types/vimeo__player/vimeo__player-tests.ts +++ b/types/vimeo__player/vimeo__player-tests.ts @@ -6,7 +6,21 @@ let player: Player ; player = new Player('handstick', { id: 19231868, - width: 640 + width: 640, + + // Use default values for settings, to test typings + autopause: true, + autoplay: false, + background: false, + byline: true, + color: '#00adef', + loop: false, + muted: false, + playsinline: true, + portrait: true, + speed: false, + title: true, + transparent: true }); const onPlay = (data: any) => { @@ -281,12 +295,33 @@ player.getPaused().then((paused) => { // an error occurred }); +player.getPlaybackRate().then((playbackRate) => { + // playbackRate = a numeric value of the current playback rate +}).catch((error) => { + // an error occurred +}); + +player.setPlaybackRate(0.5).then((playbackRate) => { + // playback rate was set +}).catch((error) => { + switch (error.name) { + case 'RangeError': + // the playback rate was less than 0.5 or greater than 2 + break; + + default: + // some other error occurred + break; + } +}); + player.getTextTracks().then((tracks) => { // tracks = an array of track objects tracks.forEach((track) => { console.log(track.label); console.log(track.kind); console.log(track.language); + console.log(track.mode); }); }).catch((error) => { // an error occurred @@ -436,6 +471,19 @@ player.on('volumechange', (data) => { console.log(data.volume); }); +player.on('playbackratechange', (data) => { + // data is an object containing properties specific to that event + console.log(data.playbackRate); +}); + +player.on('bufferstart', (data) => { + // no associated data with this event +}); + +player.on('bufferend', (data) => { + // no associated data with this event +}); + player.on('error', (data) => { // data is an object containing properties specific to that event console.log(data.message); From 80e003836d42901e8a83519b99195c2391aaf94c Mon Sep 17 00:00:00 2001 From: Stoian Ivanov Date: Mon, 6 Aug 2018 21:50:43 +0300 Subject: [PATCH 27/49] timezoneJS.Date.toString have a handy format parameter so we daclare it (#27755) --- types/timezone-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/timezone-js/index.d.ts b/types/timezone-js/index.d.ts index 5a648ab41e..ee39a7ee7b 100644 --- a/types/timezone-js/index.d.ts +++ b/types/timezone-js/index.d.ts @@ -19,7 +19,7 @@ export declare class Date { setTimezone: (timezone: string) => void; // regular Date members - toString(): string; + toString(format?:string): string; toDateString(): string; toTimeString(): string; toLocaleString(): string; From c687ee5d0cfb254cad4b74b1e6187c89594a6987 Mon Sep 17 00:00:00 2001 From: Tyler Johnson Date: Mon, 6 Aug 2018 12:52:06 -0600 Subject: [PATCH 28/49] PouchDB Database is an EventEmitter (#27771) --- types/pouchdb-core/index.d.ts | 2 +- types/pouchdb-core/pouchdb-core-tests.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/pouchdb-core/index.d.ts b/types/pouchdb-core/index.d.ts index ddecfe843b..0dbf5def5b 100644 --- a/types/pouchdb-core/index.d.ts +++ b/types/pouchdb-core/index.d.ts @@ -626,7 +626,7 @@ declare namespace PouchDB { }; } - interface Database { + interface Database extends EventEmitter { /** The name passed to the PouchDB constructor and unique identifier of the database. */ name: string; diff --git a/types/pouchdb-core/pouchdb-core-tests.ts b/types/pouchdb-core/pouchdb-core-tests.ts index fe79997461..f8accd1c3a 100644 --- a/types/pouchdb-core/pouchdb-core-tests.ts +++ b/types/pouchdb-core/pouchdb-core-tests.ts @@ -114,6 +114,8 @@ function testBasics() { const db = new PouchDB(); + db.on("closed", () => {}); + db.post(model).then((result) => { isString(result.id); }); From b5d97138d0f10f785b57ed083b0cf9677a6899e8 Mon Sep 17 00:00:00 2001 From: Maxim-Alexandre Lalancette <5281703+malalancette@users.noreply.github.com> Date: Mon, 6 Aug 2018 14:52:30 -0400 Subject: [PATCH 29/49] Add autoHeight option (#27783) --- types/owl.carousel/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/owl.carousel/index.d.ts b/types/owl.carousel/index.d.ts index b1b093ef77..9b4fbe5e89 100644 --- a/types/owl.carousel/index.d.ts +++ b/types/owl.carousel/index.d.ts @@ -61,6 +61,7 @@ declare namespace OwlCarousel { dotsContainer?: string | boolean; checkVisible?: boolean; slideTransition?: string; + autoHeight?: boolean; // CLASSES refreshClass?: string; loadingClass?: string; From c16655d79794c636051d00a8256c4316d81e3d27 Mon Sep 17 00:00:00 2001 From: SagaTious <38312007+SagaTious@users.noreply.github.com> Date: Mon, 6 Aug 2018 20:52:43 +0200 Subject: [PATCH 30/49] material__menu CornerBit interface is wrong (#27836) * fix: The const Corner that this interface shall describe is using | as bitwise operator, in the interface description | is logical or though, so the interface is wrong. * style: Rearranged values to match @material/menu constants definition again --- types/material__menu/constants.d.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/types/material__menu/constants.d.ts b/types/material__menu/constants.d.ts index 8bec0c2e0c..8c76365ef8 100644 --- a/types/material__menu/constants.d.ts +++ b/types/material__menu/constants.d.ts @@ -66,12 +66,12 @@ export interface CornerBit extends MDCNumbers { * Likewise END maps to RIGHT or LEFT depending on the directionality. */ export interface Corner extends MDCNumbers { - TOP_LEFT: 0; - TOP_RIGHT: CornerBit["RIGHT"]; - BOTTOM_LEFT: CornerBit["BOTTOM"]; - BOTTOM_RIGHT: CornerBit["BOTTOM"] | CornerBit["RIGHT"]; - TOP_START: CornerBit["FLIP_RTL"]; - TOP_END: CornerBit["FLIP_RTL"] | CornerBit["RIGHT"]; - BOTTOM_START: CornerBit["BOTTOM"] | CornerBit["FLIP_RTL"]; - BOTTOM_END: CornerBit["BOTTOM"] | CornerBit["RIGHT"] | CornerBit["FLIP_RTL"]; + TOP_LEFT: 0; + TOP_RIGHT: 4; + BOTTOM_LEFT: 1; + BOTTOM_RIGHT: 5; + TOP_START: 8; + TOP_END: 12; + BOTTOM_START: 9; + BOTTOM_END: 13; } From 49e5c50d62e4d9000d34bf35ba9d844fb1eefaf3 Mon Sep 17 00:00:00 2001 From: Steven Sinatra <5153378+diagramatics@users.noreply.github.com> Date: Tue, 7 Aug 2018 04:53:34 +1000 Subject: [PATCH 31/49] Add selectV2 definition to @storybook/addon-knobs (#27848) --- types/storybook__addon-knobs/index.d.ts | 5 ++++- .../storybook__addon-knobs/storybook__addon-knobs-tests.tsx | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/types/storybook__addon-knobs/index.d.ts b/types/storybook__addon-knobs/index.d.ts index f421303f94..0ae9ace04b 100644 --- a/types/storybook__addon-knobs/index.d.ts +++ b/types/storybook__addon-knobs/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for @storybook/addon-knobs 3.3 +// Type definitions for @storybook/addon-knobs 3.4 // Project: https://github.com/storybooks/storybook // Definitions by: Joscha Feth // Martynas Kadisa @@ -51,6 +51,9 @@ export function select(name: string, options: { [s: string]: s export function select(name: string, options: { [s: number]: string }, value: T, groupId?: string): T; export function select(name: string, options: T[], value: T, groupId?: string): T; +export function selectV2(name: string, options: { [s: string]: T | T[] }, value: T | T[], groupId?: string): T; +export function selectV2(name: string, options: T[], value: T, groupId?: string): T; + export function date(name: string, value?: Date, groupId?: string): Date; export function array(name: string, value: T[], separator?: string, groupId?: string): T[]; diff --git a/types/storybook__addon-knobs/storybook__addon-knobs-tests.tsx b/types/storybook__addon-knobs/storybook__addon-knobs-tests.tsx index c35268ac6b..fb4d077109 100644 --- a/types/storybook__addon-knobs/storybook__addon-knobs-tests.tsx +++ b/types/storybook__addon-knobs/storybook__addon-knobs-tests.tsx @@ -14,6 +14,7 @@ import { array, button, knob, + selectV2, } from '@storybook/addon-knobs'; enum SomeEnum { @@ -49,13 +50,16 @@ stories.add('with all knobs', () => { type X = 'a' | 'b'; - const genericSelect: X = select('Some generic select', { a: 'type a', b: 'type b'}, 'b'); + const genericSelect: X = select('Some generic select', { a: 'type a', b: 'type b' }, 'b'); const enumSelectOptions: { [s: number]: string } = {}; enumSelectOptions[SomeEnum.Type1] = "Type 1"; enumSelectOptions[SomeEnum.Type2] = "Type 2"; const genericSelect2: SomeEnum = select('Some generic select', enumSelectOptions, SomeEnum.Type1); + const genericSelectV2: X = selectV2('Some generic select', { 'type a': 'a', 'type b': 'b' }, 'b'); + const genericSelectV2Enum: SomeEnum = selectV2('Some generic select v2', { 'type a': SomeEnum.Type1, 'type b': SomeEnum.Type2 }, SomeEnum.Type2); + const genericArray: string[] = array('Some generic array', ['red', 'green', 'blue']); const genericKnob: X = knob('Some generic knob', { value: 'a', type: 'text' }); From 9e26d926ebb8a172db1b18f5a9a5f7cb995c30d6 Mon Sep 17 00:00:00 2001 From: nemoinho Date: Mon, 6 Aug 2018 20:55:43 +0200 Subject: [PATCH 32/49] Update version of redom-types (#27856) --- types/redom/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/redom/index.d.ts b/types/redom/index.d.ts index 2814b63c61..fde67bfb12 100644 --- a/types/redom/index.d.ts +++ b/types/redom/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for redom 3.6 +// Type definitions for redom 3.12 // Project: https://github.com/redom/redom/ // Definitions by: Rauli Laine // Felix Nehrke From 059cf948f833f66e3fe6d74636c2323d25413159 Mon Sep 17 00:00:00 2001 From: remin Date: Tue, 7 Aug 2018 03:57:43 +0900 Subject: [PATCH 33/49] @types/react-resize-detector: Update to v3.1.0 (#27860) * update react-resize-detector to allow undefined onResize * update react-resize-detector * update test of react-resize-detector * fix format * add an author --- types/react-resize-detector/index.d.ts | 17 +++++-- .../react-resize-detector-tests.tsx | 48 ++++++++++++++----- 2 files changed, 49 insertions(+), 16 deletions(-) mode change 100644 => 100755 types/react-resize-detector/index.d.ts mode change 100644 => 100755 types/react-resize-detector/react-resize-detector-tests.tsx diff --git a/types/react-resize-detector/index.d.ts b/types/react-resize-detector/index.d.ts old mode 100644 new mode 100755 index ee9341a358..68f0382dba --- a/types/react-resize-detector/index.d.ts +++ b/types/react-resize-detector/index.d.ts @@ -1,6 +1,8 @@ -// Type definitions for react-resize-detector 2.2 +// Type definitions for react-resize-detector 3.1 // Project: https://github.com/maslianok/react-resize-detector -// Definitions by: Matthew James , James Greenleaf +// Definitions by: Matthew James +// James Greenleaf +// Remin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -8,7 +10,7 @@ import * as React from "react"; interface ReactResizeDetectorProps extends React.Props { /** Function that will be invoked with width and height arguments */ - onResize: (width: number, height: number) => void; + onResize?: (width: number, height: number) => void; /** Trigger onResize on height change. Default: false */ handleHeight?: boolean; /** Trigger onResize on width change. Default: false */ @@ -18,11 +20,18 @@ interface ReactResizeDetectorProps extends React.Props { /** Id of the element we want to observe. If none provided, parentElement of the component will be used. Default: "" */ resizableElementId?: string; /** Possible values: throttle and debounce */ - refreshMode?: 'throttle' | 'debounce'; + refreshMode?: "throttle" | "debounce"; /** Makes sense only when refreshMode is set. Default: 1000. */ refreshRate?: number; + + render?: (props: any) => React.ReactNode; } declare class ReactResizeDetector extends React.PureComponent { } +export declare function withResizeDetector( + WrappedComponent: React.ReactNode, + props?: ReactResizeDetectorProps +): React.Component; + export default ReactResizeDetector; diff --git a/types/react-resize-detector/react-resize-detector-tests.tsx b/types/react-resize-detector/react-resize-detector-tests.tsx old mode 100644 new mode 100755 index 42a76d8a52..d6e471f340 --- a/types/react-resize-detector/react-resize-detector-tests.tsx +++ b/types/react-resize-detector/react-resize-detector-tests.tsx @@ -2,8 +2,11 @@ import * as React from "react"; import * as ReactDOM from "react-dom"; +import ReactResizeDetector, { withResizeDetector } from "react-resize-detector"; -import ReactResizeRouter from "react-resize-detector"; +const CustomComponent = ({ width, height }: any) => ( +
{`${width}x${height}`}
+); class App extends React.PureComponent { constructor(props: {}) { @@ -13,17 +16,38 @@ class App extends React.PureComponent { } render(): JSX.Element { - return
-
Some child content
- -
; + return ( +
+
Some child content
+ + + {(width: number, height: number) => ( +
{`${width}x${height}`}
+ )} +
+ + + + {withResizeDetector(CustomComponent)} + ( +
+ Width:{width}, Height:{height} +
+ )} + /> +
+ ); } private handleResize(width: number, height: number) { From 3bf0d7c946487e8e5b977594060ef70fac342084 Mon Sep 17 00:00:00 2001 From: York Yao Date: Tue, 7 Aug 2018 02:59:01 +0800 Subject: [PATCH 34/49] [@types/node] add missing optional padding and saltLength (#27866) --- types/node/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 49fd7364e3..ed04749756 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -5863,8 +5863,8 @@ declare module "crypto" { export interface Signer extends NodeJS.WritableStream { update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer; update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }): Buffer; + sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string, options?: stream.WritableOptions): Verify; export interface Verify extends NodeJS.WritableStream { From 33698bbac399c50504b0108c725673307333de98 Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Mon, 6 Aug 2018 15:00:56 -0400 Subject: [PATCH 35/49] ioredis: add some missing overloads and methods (#27870) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the following for base redis and pipeline methods - Corrected the `set()` method’s arguments and returns - added the `setBuffer()` method - added the `hsetBuffer()` method - added the `hgetBuffer()` method --- types/ioredis/index.d.ts | 32 ++++++++++++++++++++++++++++++-- types/ioredis/ioredis-tests.ts | 19 ++++++++++++++++++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/types/ioredis/index.d.ts b/types/ioredis/index.d.ts index 45b334a205..e593f4dcc3 100644 --- a/types/ioredis/index.d.ts +++ b/types/ioredis/index.d.ts @@ -6,6 +6,7 @@ // Ebrahim // Shahar Mor // Whemoon Jang +// Francis Gulotta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -65,10 +66,23 @@ declare namespace IORedis { get(key: string, callback: (err: Error, res: string) => void): void; get(key: string): Promise; + getBuffer(key: string, callback: (err: Error, res: Buffer) => void): void; getBuffer(key: string): Promise; - set(key: string, value: any, ...args: any[]): any; + set(key: string, value: any, expiryMode?: string | any[], time?: number | string, setMode?: number | string): Promise; + + set(key: string, value: any, callback: (err: Error, res: string) => void): void; + set(key: string, value: any, setMode: string | any[], callback: (err: Error, res: string) => void): void; + set(key: string, value: any, expiryMode: string, time: number | string, callback: (err: Error, res: string) => void): void; + set(key: string, value: any, expiryMode: string, time: number | string, setMode: number | string, callback: (err: Error, res: string) => void): void; + + setBuffer(key: string, value: any, expiryMode?: string | any[], time?: number | string, setMode?: number | string): Promise; + + setBuffer(key: string, value: any, callback: (err: Error, res: Buffer) => void): void; + setBuffer(key: string, value: any, setMode: string, callback: (err: Error, res: Buffer) => void): void; + setBuffer(key: string, value: any, expiryMode: string, time: number, callback: (err: Error, res: Buffer) => void): void; + setBuffer(key: string, value: any, expiryMode: string, time: number | string, setMode: number | string, callback: (err: Error, res: Buffer) => void): void; setnx(key: string, value: any, callback: (err: Error, res: any) => void): void; setnx(key: string, value: any): Promise; @@ -241,12 +255,16 @@ declare namespace IORedis { hset(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void; hset(key: string, field: string, value: any): Promise<0 | 1>; + hsetBuffer(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void; + hsetBuffer(key: string, field: string, value: any): Promise; hsetnx(key: string, field: string, value: any, callback: (err: Error, res: 0 | 1) => void): void; hsetnx(key: string, field: string, value: any): Promise<0 | 1>; hget(key: string, field: string, callback: (err: Error, res: string) => void): void; hget(key: string, field: string): Promise; + hgetBuffer(key: string, field: string, callback: (err: Error, res: Buffer) => void): void; + hgetBuffer(key: string, field: string): Promise; hmset(key: string, field: string, value: any, ...args: string[]): Promise<0 | 1>; hmset(key: string, data: any, callback: (err: Error, res: 0 | 1) => void): void; @@ -471,7 +489,15 @@ declare namespace IORedis { get(key: string, callback?: (err: Error, res: string) => void): Pipeline; getBuffer(key: string, callback?: (err: Error, res: Buffer) => void): Pipeline; - set(key: string, value: any, ...args: any[]): Pipeline; + set(key: string, value: any, callback?: (err: Error, res: string) => void): Pipeline; + set(key: string, value: any, setMode: string, callback?: (err: Error, res: string) => void): Pipeline; + set(key: string, value: any, expiryMode: string, time: number, callback?: (err: Error, res: string) => void): Pipeline; + set(key: string, value: any, expiryMode: string, time: number, setMode: string, callback?: (err: Error, res: string) => void): Pipeline; + + setBuffer(key: string, value: any, callback?: (err: Error, res: Buffer) => void): Pipeline; + setBuffer(key: string, value: any, setMode: string, callback?: (err: Error, res: Buffer) => void): Pipeline; + setBuffer(key: string, value: any, expiryMode: string, time: number, callback?: (err: Error, res: Buffer) => void): Pipeline; + setBuffer(key: string, value: any, expiryMode: string, time: number, setMode: string, callback?: (err: Error, res: Buffer) => void): Pipeline; setnx(key: string, value: any, callback?: (err: Error, res: any) => void): Pipeline; @@ -602,10 +628,12 @@ declare namespace IORedis { zrevrank(key: string, member: string, callback?: (err: Error, res: number) => void): Pipeline; hset(key: string, field: string, value: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline; + hsetBuffer(key: string, field: string, value: any, callback?: (err: Error, res: Buffer) => void): Pipeline; hsetnx(key: string, field: string, value: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline; hget(key: string, field: string, callback?: (err: Error, res: string) => void): Pipeline; + hgetBuffer(key: string, field: string, callback?: (err: Error, res: Buffer) => void): Pipeline; hmset(key: string, field: string, value: any, ...args: string[]): Pipeline; hmset(key: string, data: any, callback?: (err: Error, res: 0 | 1) => void): Pipeline; diff --git a/types/ioredis/ioredis-tests.ts b/types/ioredis/ioredis-tests.ts index 7dd98879a5..32ae5c24d5 100644 --- a/types/ioredis/ioredis-tests.ts +++ b/types/ioredis/ioredis-tests.ts @@ -16,7 +16,20 @@ redis.sadd('set', 1, 3, 5, 7); redis.sadd('set', [1, 3, 5, 7]); // All arguments are passed directly to the redis server: -redis.set('key', '100', 'EX', 10); +redis.set('key', '100'); +redis.set('key', '100', 'XX'); +redis.set('key', '100', 'PX', 10); +redis.set('key', '100', 'EX', 10, 'NX'); +redis.set('key', '100', 'NX', 'EX', 10); +redis.set('key', '100', ['EX', 10, 'NX']); +redis.setBuffer('key', '100', 'NX', 'EX', 10); + +redis.set('key', '100', (err, data) => {}); +redis.set('key', '100', 'XX', (err, data) => {}); +redis.set('key', '100', 'PX', 10, (err, data) => {}); +redis.set('key', '100', 'EX', 10, 'NX', (err, data) => {}); +redis.set('key', '100', ['EX', 10, 'NX'], (err, data) => {}); +redis.setBuffer('key', '100', 'NX', 'EX', 10, (err, data) => {}); new Redis(); // Connect to 127.0.0.1:6379 new Redis(6380); // 127.0.0.1:6380 @@ -59,6 +72,10 @@ redis.on('messageBuffer', (channel: any, message: any) => { const pipeline = redis.pipeline(); pipeline.set('foo', 'bar'); pipeline.del('cc'); +pipeline.hset('hash', 'foo', 4); +pipeline.hget('hash', 'foo'); +pipeline.hsetBuffer('hash', 'fooBuffer', 4); +pipeline.hgetBuffer('hash', 'fooBuffer'); pipeline.exec((err, results) => { // `err` is always null, and `results` is an array of responses // corresponding to the sequence of queued commands. From 135d115688b907ea3b714be83f8508ef45ae0f5a Mon Sep 17 00:00:00 2001 From: Jon Freedman Date: Mon, 6 Aug 2018 20:01:51 +0100 Subject: [PATCH 36/49] [react-select] switch DOM Node for ReactNode as per other files (#27871) * as elsewhere Node type should refer to ReactNode not a DOM node * lint fix :( * remove ReactNode -> Node alias and use ReactNode type throughout --- types/react-select/lib/Creatable.d.ts | 4 ++-- types/react-select/lib/Select.d.ts | 24 +++++++++---------- types/react-select/lib/builtins.d.ts | 4 ++-- .../react-select/lib/components/Control.d.ts | 4 ++-- types/react-select/lib/components/Group.d.ts | 6 ++--- types/react-select/lib/components/Menu.d.ts | 8 +++---- .../lib/components/MultiValue.d.ts | 10 ++++---- types/react-select/lib/components/Option.d.ts | 4 ++-- .../lib/components/Placeholder.d.ts | 4 ++-- .../lib/components/containers.d.ts | 8 +++---- 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/types/react-select/lib/Creatable.d.ts b/types/react-select/lib/Creatable.d.ts index ac67bf039c..5cae63021c 100644 --- a/types/react-select/lib/Creatable.d.ts +++ b/types/react-select/lib/Creatable.d.ts @@ -11,13 +11,13 @@ export interface CreatableProps { allowCreateWhileLoading?: boolean; /* Gets the label for the "create new ..." option in the menu. Is given the current input value. */ - formatCreateLabel?: (inputValue: string) => Node; + formatCreateLabel?: (inputValue: string) => React.ReactNode; /* Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array. */ isValidNewOption?: (inputValue: string, value: ValueType, options: OptionsType) => boolean; /* Returns the data for the new option when it is created. Used to display the value, and is passed to `onChange`. */ - getNewOptionData?: (inputValue: string, optionLabel: Node) => OptionType; + getNewOptionData?: (inputValue: string, optionLabel: React.ReactNode) => OptionType; /* If provided, this will be called with the input value when a new option is created, and `onChange` will **not** be called. Use this when you need more control over what happens when new options are created. */ diff --git a/types/react-select/lib/Select.d.ts b/types/react-select/lib/Select.d.ts index 3e89a139ac..aa8524103e 100644 --- a/types/react-select/lib/Select.d.ts +++ b/types/react-select/lib/Select.d.ts @@ -107,7 +107,7 @@ export interface Props { /* Formats group labels in the menu as React components */ formatGroupLabel?: typeof formatGroupLabel; /* Formats option labels in the menu and control as React components */ - formatOptionLabel?: (option: OptionType, labelMeta: FormatOptionLabelMeta) => Node; + formatOptionLabel?: (option: OptionType, labelMeta: FormatOptionLabelMeta) => React.ReactNode; /* Resolves option data to a string to be displayed as the label by components */ getOptionLabel?: typeof getOptionLabel; /* Resolves option data to a string to compare options and specify value attributes */ @@ -311,7 +311,7 @@ export default class Select extends React.Component void; setValue: (newValue: ValueType, action: ActionTypes, option?: OptionType) => void; selectProps: Readonly<{ - children?: Node; + children?: React.ReactNode; }> & Readonly>; }; @@ -343,8 +343,8 @@ export default class Select extends React.Component): boolean; isOptionSelected(option: OptionType, selectValue: OptionsType): boolean; filterOption(option: {}, inputValue: string): boolean; - formatOptionLabel(data: OptionType, context: FormatOptionLabelContext): Node; - formatGroupLabel(data: GroupType): Node; + formatOptionLabel(data: OptionType, context: FormatOptionLabelContext): React.ReactNode; + formatGroupLabel(data: GroupType): React.ReactNode; // ============================== // Mouse Handlers @@ -406,14 +406,14 @@ export default class Select extends React.Component | null; - renderClearIndicator(): Node; - renderLoadingIndicator(): Node; - renderIndicatorSeparator(): Node; - renderDropdownIndicator(): Node; - renderMenu(): Node; - renderFormField(): Node; + renderClearIndicator(): React.ReactNode; + renderLoadingIndicator(): React.ReactNode; + renderIndicatorSeparator(): React.ReactNode; + renderDropdownIndicator(): React.ReactNode; + renderMenu(): React.ReactNode; + renderFormField(): React.ReactNode; - renderLiveRegion(): Node; + renderLiveRegion(): React.ReactNode; } diff --git a/types/react-select/lib/builtins.d.ts b/types/react-select/lib/builtins.d.ts index b1e1c37cc8..5d404230cd 100644 --- a/types/react-select/lib/builtins.d.ts +++ b/types/react-select/lib/builtins.d.ts @@ -1,7 +1,7 @@ -import { ReactNode as Node } from 'react'; +import { ReactNode } from 'react'; import { GroupType } from './types'; -export function formatGroupLabel(group: GroupType): Node; +export function formatGroupLabel(group: GroupType): ReactNode; export function getOptionLabel(option: any): string; diff --git a/types/react-select/lib/components/Control.d.ts b/types/react-select/lib/components/Control.d.ts index c48dee76d4..8a9513197b 100644 --- a/types/react-select/lib/components/Control.d.ts +++ b/types/react-select/lib/components/Control.d.ts @@ -1,4 +1,4 @@ -import { ComponentType, ReactNode as Node, Ref as ElementRef } from 'react'; +import { ComponentType, ReactNode, Ref as ElementRef } from 'react'; import { borderRadius, colors, spacing } from '../theme'; import { CommonProps, PropsWithStyles } from '../types'; @@ -14,7 +14,7 @@ export type ControlProps = CommonProps & PropsWithStyles & State & { /** Children to render. */ - children: Node, + children: ReactNode, innerRef: ElementRef, /** The mouse down event and the innerRef to pass down to the controller element. */ innerProps: { diff --git a/types/react-select/lib/components/Group.d.ts b/types/react-select/lib/components/Group.d.ts index 9e05263224..39c3489bce 100644 --- a/types/react-select/lib/components/Group.d.ts +++ b/types/react-select/lib/components/Group.d.ts @@ -1,15 +1,15 @@ -import { ReactNode as Node, ComponentType } from 'react'; +import { ReactNode, ComponentType } from 'react'; import { spacing } from '../theme'; import { CommonProps } from '../types'; interface ComponentProps { /** The children to be rendered. */ - children: Node; + children: ReactNode; /** Component to wrap the label, recieves headingProps. */ Heading: ComponentType; /** Label to be displayed in the heading component. */ - label: Node; + label: ReactNode; } export type GroupProps = CommonProps & ComponentProps; diff --git a/types/react-select/lib/components/Menu.d.ts b/types/react-select/lib/components/Menu.d.ts index d91288cdeb..0af2bf16c1 100644 --- a/types/react-select/lib/components/Menu.d.ts +++ b/types/react-select/lib/components/Menu.d.ts @@ -2,7 +2,7 @@ import { Component, ReactElement, Ref as ElementRef, - ReactNode as Node, + ReactNode, ComponentType } from 'react'; import { createPortal } from 'react-dom'; @@ -89,7 +89,7 @@ interface MenuListState { export interface MenuListProps { /** The children to be rendered. */ - children: Node; + children: ReactNode; /** Inner ref to DOM Node */ innerRef: InnerRef; } @@ -108,7 +108,7 @@ export function loadingMessageCSS(): React.CSSProperties; export type NoticeProps = CommonProps & { /** The children to be rendered. */ - children: Node, + children: ReactNode, /** Props to be passed on to the wrapper. */ innerProps: { [key: string]: any }, }; @@ -129,7 +129,7 @@ export const LoadingMessage: ComponentType>; export type MenuPortalProps = CommonProps & { appendTo: HTMLElement, - children: Node, // ideally Menu + children: ReactNode, // ideally Menu controlElement: HTMLElement, menuPlacement: MenuPlacement, menuPosition: MenuPosition, diff --git a/types/react-select/lib/components/MultiValue.d.ts b/types/react-select/lib/components/MultiValue.d.ts index ac304bd42a..59974fbc46 100644 --- a/types/react-select/lib/components/MultiValue.d.ts +++ b/types/react-select/lib/components/MultiValue.d.ts @@ -1,10 +1,10 @@ -import { ComponentType, Component, ReactNode as Node } from 'react'; +import { ComponentType, Component, ReactNode } from 'react'; import { borderRadius, colors, spacing } from '../theme'; import { CommonProps } from '../types'; export type MultiValueProps = CommonProps &{ - children: Node, + children: ReactNode, components: any, cropWithEllipsis: boolean, data: OptionType, @@ -23,7 +23,7 @@ export function multiValueLabelCSS(props: MultiValueProps): React.CSSProper export function multiValueRemoveCSS(props: MultiValueProps): React.CSSProperties; export interface MultiValueGenericProps { - children: Node; + children: ReactNode; data: OptionType; innerProps: { className?: string }; selectProps: any; @@ -33,7 +33,7 @@ export const MultiValueGeneric: ComponentType>; export const MultiValueContainer: typeof MultiValueGeneric; export const MultiValueLabel: typeof MultiValueGeneric; export type MultiValueRemoveProps = CommonProps & { - children: Node, + children: ReactNode, innerProps: { className: string, onTouchEnd: (event: any) => void, @@ -44,7 +44,7 @@ export type MultiValueRemoveProps = CommonProps & { }; export class MultiValueRemove extends Component> { static defaultProps: { - children: Node, + children: ReactNode, }; } diff --git a/types/react-select/lib/components/Option.d.ts b/types/react-select/lib/components/Option.d.ts index 81ab38e401..defe37711a 100644 --- a/types/react-select/lib/components/Option.d.ts +++ b/types/react-select/lib/components/Option.d.ts @@ -1,4 +1,4 @@ -import { ComponentType, ReactNode as Node, MouseEventHandler } from 'react'; +import { ComponentType, ReactNode, MouseEventHandler } from 'react'; import { colors, spacing } from '../theme'; import { CommonProps, PropsWithStyles, InnerRef } from '../types'; @@ -22,7 +22,7 @@ export type OptionProps = PropsWithStyles & CommonProps & State & { /** The children to be rendered. */ - children: Node, + children: ReactNode, /** Inner ref to DOM Node */ innerRef: InnerRef, /** props passed to the wrapping element for the group. */ diff --git a/types/react-select/lib/components/Placeholder.d.ts b/types/react-select/lib/components/Placeholder.d.ts index 6f674d70a8..1a72bd69a7 100644 --- a/types/react-select/lib/components/Placeholder.d.ts +++ b/types/react-select/lib/components/Placeholder.d.ts @@ -1,11 +1,11 @@ -import { ComponentType, ReactNode as Node } from 'react'; +import { ComponentType, ReactNode } from 'react'; import { colors, spacing } from '../theme'; import { CommonProps } from '../types'; export type PlaceholderProps = CommonProps & { /** The children to be rendered. */ - children: Node, + children: ReactNode, /** props passed to the wrapping element for the group. */ innerProps: { [key: string]: any }, }; diff --git a/types/react-select/lib/components/containers.d.ts b/types/react-select/lib/components/containers.d.ts index e75de6d756..c72609bf31 100644 --- a/types/react-select/lib/components/containers.d.ts +++ b/types/react-select/lib/components/containers.d.ts @@ -1,4 +1,4 @@ -import { Component, ReactNode as Node, ComponentType } from 'react'; +import { Component, ReactNode, ComponentType } from 'react'; import { spacing } from '../theme'; import { CommonProps, KeyboardEventHandler } from '../types'; @@ -16,7 +16,7 @@ export interface ContainerState { export type ContainerProps = CommonProps & ContainerState & { /** The children to be rendered. */ - children: Node, + children: ReactNode, /** Inner props to be passed down to the container. */ innerProps: { onKeyDown: KeyboardEventHandler }, }; @@ -33,7 +33,7 @@ export type ValueContainerProps = CommonProps & { /** Whether the value container currently holds a value. */ hasValue: boolean, /** The children to be rendered. */ - children: Node, + children: ReactNode, }; export function valueContainerCSS(): React.CSSProperties; export class ValueContainer extends Component> {} @@ -50,7 +50,7 @@ export interface IndicatorsState { export type IndicatorContainerProps = CommonProps & IndicatorsState & { /** The children to be rendered. */ - children: Node, + children: ReactNode, }; export function indicatorsContainerCSS(): React.CSSProperties; From 563ac4735f9273c3796f96e26c74052f83b13d3f Mon Sep 17 00:00:00 2001 From: Lexie Hankins <425572+AlexHankins@users.noreply.github.com> Date: Mon, 6 Aug 2018 15:02:40 -0400 Subject: [PATCH 37/49] Add types for extsprintf (#27875) * Add types for extsprintf * Fix extprintf.Stream callback type. --- types/extsprintf/extsprintf-tests.ts | 8 ++++++++ types/extsprintf/index.d.ts | 12 ++++++++++++ types/extsprintf/tsconfig.json | 23 +++++++++++++++++++++++ types/extsprintf/tslint.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 types/extsprintf/extsprintf-tests.ts create mode 100644 types/extsprintf/index.d.ts create mode 100644 types/extsprintf/tsconfig.json create mode 100644 types/extsprintf/tslint.json diff --git a/types/extsprintf/extsprintf-tests.ts b/types/extsprintf/extsprintf-tests.ts new file mode 100644 index 0000000000..4b45462487 --- /dev/null +++ b/types/extsprintf/extsprintf-tests.ts @@ -0,0 +1,8 @@ +import { sprintf, fprintf, printf } from "extsprintf"; + +fprintf({write: (s: string) => {}}, ''); +fprintf({write: (s: string) => {}}, '', {}, [], null, 0, ''); +printf(''); +printf('', {}, [], null, 0, ''); +sprintf(''); // $ExpectType string +sprintf('', {}, [], null, 0, ''); // $ExpectType string diff --git a/types/extsprintf/index.d.ts b/types/extsprintf/index.d.ts new file mode 100644 index 0000000000..29d073b4c5 --- /dev/null +++ b/types/extsprintf/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for extsprintf 1.4 +// Project: https://github.com/joyent/node-extsprintf#readme +// Definitions by: Alex Hankins +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export interface Stream { + write(str: string): void; +} + +export function fprintf(stream: Stream, format: string, ...args: any[]): any; +export function printf(format: string, ...args: any[]): any; +export function sprintf(format: string, ...args: any[]): string; diff --git a/types/extsprintf/tsconfig.json b/types/extsprintf/tsconfig.json new file mode 100644 index 0000000000..bc9783f347 --- /dev/null +++ b/types/extsprintf/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "extsprintf-tests.ts" + ] +} diff --git a/types/extsprintf/tslint.json b/types/extsprintf/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/extsprintf/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a04576e8000854a4ba527c155901f7f4e72bf18a Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Mon, 6 Aug 2018 21:02:58 +0200 Subject: [PATCH 38/49] [@types/dnssd] More fixes according the original source (#27877) * Another set of fixes * Fix lint * Fix support for object type --- types/dnssd/index.d.ts | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/types/dnssd/index.d.ts b/types/dnssd/index.d.ts index 80de2900f3..8ef8aa84fd 100644 --- a/types/dnssd/index.d.ts +++ b/types/dnssd/index.d.ts @@ -3,13 +3,14 @@ // Definitions by: Angel Merino // Max Rumpf // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// import { EventEmitter } from 'events'; /** Declaration file generated by dts-gen */ -export class Advertisement { +export class Advertisement extends EventEmitter { constructor(type: string | string[] | ServiceType, port: number, ...args: any[]); start(): Advertisement; @@ -43,7 +44,7 @@ export class Service { } export class ServiceType { - constructor(...args: string[]) + constructor(...args: Array) constructor(args: ServiceType); name: string; @@ -60,29 +61,29 @@ export class ServiceType { } export class Browser extends EventEmitter { - constructor(type: any, ...args: any[]); + constructor(type: string | string[] | ServiceType, ...args: any[]); - list(): any; + start(): Browser; - start(): any; + stop(): void; - stop(): any; + list(): any[]; } -export const resolveA: any; +export function resolve(name: string, type: string, args: object): Promise; -export const resolveAAAA: any; +export function resolve4(name: string, type: string, args: object): Promise; -export function all(): ServiceType; +export function resolve6(name: string, type: string, args: object): Promise; -export function resolve(name: any, type: any, ...args: any[]): any; +export function resolveSRV(name: string, args: object): Promise; -export function resolveSRV(name: any, opts: any): any; +export function resolveTXT(name: string, args: object): Promise; -export function resolveService(name: any, ...args: any[]): any; - -export function resolveTXT(name: any, opts: any): any; +export function resolveService(name: string, args: object): Promise; export function tcp(...args: string[]): ServiceType; export function udp(...args: string[]): ServiceType; + +export function all(): ServiceType; From ef1f0f87e88c96f2f6a32e267b009995cd3c8e2b Mon Sep 17 00:00:00 2001 From: Brandon Hall Date: Mon, 6 Aug 2018 15:05:06 -0400 Subject: [PATCH 39/49] [react-virtualized] Fix WindowScrollerChildProps (#27880) --- .../dist/es/WindowScroller.d.ts | 16 +++------------- types/react-virtualized/index.d.ts | 1 + 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/types/react-virtualized/dist/es/WindowScroller.d.ts b/types/react-virtualized/dist/es/WindowScroller.d.ts index 628d58744d..c3074208d6 100644 --- a/types/react-virtualized/dist/es/WindowScroller.d.ts +++ b/types/react-virtualized/dist/es/WindowScroller.d.ts @@ -11,26 +11,16 @@ export type WindowScrollerChildProps = { width: number; isScrolling: boolean; scrollTop: number; - onChildScroll: () => void; + onChildScroll: (params: { scrollTop: number }) => void; }; export type WindowScrollerProps = { /** * Function responsible for rendering children. * This function should implement the following signature: - * ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element + * ({ height, isScrolling, scrollLeft, scrollTop, width, onChildScroll }) => PropTypes.element */ - children: ( - params: { - onChildScroll: (params: { scrollTop: number }) => void; - registerChild: (params?: Element) => void; - height: number; - isScrolling: boolean; - scrollLeft: number; - scrollTop: number; - width: number; - } - ) => React.ReactNode; + children: (params: WindowScrollerChildProps) => React.ReactNode; /** Callback to be invoked on-resize: ({ height, width }) */ onResize?: (params: { height: number; width: number }) => void; diff --git a/types/react-virtualized/index.d.ts b/types/react-virtualized/index.d.ts index b7c557d875..4cbc644bc8 100644 --- a/types/react-virtualized/index.d.ts +++ b/types/react-virtualized/index.d.ts @@ -7,6 +7,7 @@ // Kræn Hansen // Steve Zhang // Maciej Goszczycki +// Brandon Hall // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 From 347bdf75c3d079100592760c1c54a901d6f3b82e Mon Sep 17 00:00:00 2001 From: Simon Schick Date: Mon, 6 Aug 2018 21:05:57 +0200 Subject: [PATCH 40/49] feat(stripe): add failure_reason for refunds (#27884) --- types/stripe/index.d.ts | 13 +++++++++---- types/stripe/stripe-tests.ts | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index e05908e579..cc944284e0 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -189,7 +189,7 @@ declare namespace Stripe { * account holder to setup a username and password, and handle all account * management directly with them. Possible values are custom and standard. */ - type: 'custom' | 'standard'; + type: "custom" | "standard"; } interface IAccountShared { @@ -1470,7 +1470,7 @@ declare namespace Stripe { source?: sources.ISourceCreationOptionsExtended; } - interface ICustomerListOptions extends IListOptionsCreated { + interface ICustomerListOptions extends IListOptionsCreated { /** * A filter on the list based on the customer’s email field. The value must be a string. */ @@ -4347,7 +4347,7 @@ declare namespace Stripe { /** * Value is 'card' */ - object: 'card'; + object: "card"; /** * The card number @@ -4680,7 +4680,7 @@ declare namespace Stripe { trial_period_days?: number; /** - * Indicates if a plan’s trial_period_days should be applied to the subscription. Setting trial_end per subscription is preferred, + * Indicates if a plan’s trial_period_days should be applied to the subscription. Setting trial_end per subscription is preferred, * and this defaults to false. Setting this flag to true together with trial_end is not allowed. */ trial_from_plan?: boolean; @@ -5039,6 +5039,11 @@ declare namespace Stripe { * For other types of refunds, it can be pending, succeeded, failed, or canceled. */ status: "pending" | "succeeded" | "failed" | "canceled"; + + /** + * If the refund failed, the reason for refund failure if known. + */ + failure_reason?: "lost_or_stolen_card" | "expired_or_canceled_card" | "unknown"; } interface IRefundCreationOptions extends IDataOptionsWithMetadata { diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index ef30b621b2..4e538abddb 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -59,6 +59,7 @@ stripe.charges.create({ // asynchronously called charge.refunds.create().then(function (refund) { + const reason = refund.failure_reason; // asynchronously called }); charge.refunds.create({ amount: 100 }).then(function (refund) { From 320cebc6f37701b871ff76c6b62330f9cf4ab213 Mon Sep 17 00:00:00 2001 From: Auston Zahrt Date: Mon, 6 Aug 2018 12:07:01 -0700 Subject: [PATCH 41/49] Add types for capture-console (#27891) Adds type definitions for the NPM package "capture-console" v1.0.1 --- .../capture-console/capture-console-tests.ts | 53 +++++ types/capture-console/index.d.ts | 190 ++++++++++++++++++ types/capture-console/tsconfig.json | 23 +++ types/capture-console/tslint.json | 1 + 4 files changed, 267 insertions(+) create mode 100644 types/capture-console/capture-console-tests.ts create mode 100644 types/capture-console/index.d.ts create mode 100644 types/capture-console/tsconfig.json create mode 100644 types/capture-console/tslint.json diff --git a/types/capture-console/capture-console-tests.ts b/types/capture-console/capture-console-tests.ts new file mode 100644 index 0000000000..45dd3a7130 --- /dev/null +++ b/types/capture-console/capture-console-tests.ts @@ -0,0 +1,53 @@ +import * as captureconsole from "capture-console"; + +captureconsole.capture(process.stdout, () => { }); // $ExpectType string[] +captureconsole.capture(process.stdout, {}, () => { }); // $ExpectType string[] +captureconsole.capture(process.stdout, { quiet: true }, () => { }); // $ExpectType string[] + +captureconsole.capture([process.stdout, process.stdin], () => { }); // $ExpectType string[] +captureconsole.capture([process.stdout, process.stdin], {}, () => { }); // $ExpectType string[] +captureconsole.capture([process.stdout, process.stdin], { quiet: true }, () => { }); // $ExpectType string[] + +captureconsole.captureStderr(() => { }); // $ExpectType string +captureconsole.captureStderr({}, () => { }); // $ExpectType string +captureconsole.captureStderr({ quiet: true }, () => { }); // $ExpectType string + +captureconsole.captureStdio(() => { }); // $ExpectType { stdout: string; stderr: string; } +captureconsole.captureStdio({}, () => { }); // $ExpectType { stdout: string; stderr: string; } +captureconsole.captureStdio({ quiet: true }, () => { }); // $ExpectType { stdout: string; stderr: string; } + +captureconsole.captureStdout(() => { }); // $ExpectType string +captureconsole.captureStdout({}, () => { }); // $ExpectType string +captureconsole.captureStdout({ quiet: true }, () => { }); // $ExpectType string + +captureconsole.hook(process.stdout, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean +captureconsole.hook(process.stdout, {}, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean +captureconsole.hook(process.stdout, { quiet: true }, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType () => boolean + +captureconsole.intercept(process.stdout, () => { }); // $ExpectType string[] +captureconsole.intercept(process.stdout, {}, () => { }); // $ExpectType string[] +captureconsole.intercept(process.stdout, { quiet: true }, () => { }); // $ExpectType string[] + +captureconsole.interceptStderr(() => { }); // $ExpectType string +captureconsole.interceptStderr({}, () => { }); // $ExpectType string +captureconsole.interceptStderr({ quiet: true }, () => { }); // $ExpectType string + +captureconsole.interceptStdio(() => { }); // $ExpectType { stdout: string; stderr: string; } +captureconsole.interceptStdio({}, () => { }); // $ExpectType { stdout: string; stderr: string; } +captureconsole.interceptStdio({ quiet: true }, () => { }); // $ExpectType { stdout: string; stderr: string; } + +captureconsole.interceptStdout(() => { }); // $ExpectType string +captureconsole.interceptStdout({}, () => { }); // $ExpectType string +captureconsole.interceptStdout({ quiet: true }, () => { }); // $ExpectType string + +captureconsole.startCapture(process.stdout, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean +captureconsole.startCapture(process.stdout, {}, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean +captureconsole.startCapture(process.stdout, { quiet: true }, (string: string, encoding?: string, fd?: (error?: any) => void) => { }); // $ExpectType boolean + +captureconsole.startIntercept(process.stdout, () => { }); // $ExpectType boolean +captureconsole.startIntercept(process.stdout, {}, () => { }); // $ExpectType boolean +captureconsole.startIntercept(process.stdout, { quiet: true }, () => { }); // $ExpectType boolean + +captureconsole.stopCapture(process.stdout); // $ExpectType boolean + +captureconsole.stopIntercept(process.stdout); // $ExpectType boolean diff --git a/types/capture-console/index.d.ts b/types/capture-console/index.d.ts new file mode 100644 index 0000000000..d3ebd914f9 --- /dev/null +++ b/types/capture-console/index.d.ts @@ -0,0 +1,190 @@ +// Type definitions for capture-console 1.0 +// Project: https://github.com/zackehh/capture-console +// Definitions by: Auston Zahrt +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +/** + * Options controlling behavior when capturing + */ +export interface CaptureOptions { + /** + * Option to silence the output going to the console + */ + quiet?: boolean; +} + +/** + * Executes the provided function with the output + * on the provided streams. + */ +export function capture( + streams: ReadonlyArray | NodeJS.WritableStream, + exec: () => void +): string[]; + +/** + * Executes the provided function with the output + * on the provided streams. Accepts options to silence + * the output going to the console. + */ +export function capture( + streams: ReadonlyArray | NodeJS.WritableStream, + opts: CaptureOptions, + exec: () => void +): string[]; + +/** + * Captures stderr for the provided execution scope. + */ +export function captureStderr(exec: () => void): string; + +/** + * Captures stderr for the provided execution scope. + */ +export function captureStderr(opts: CaptureOptions, exec: () => void): string; + +/** + * Captures stdout and stderr into an object for + * the provided execution scope. + */ +export function captureStdio(exec: () => void): { stdout: string; stderr: string; }; + +/** + * Captures stdout and stderr into an object for + * the provided execution scope. + */ +export function captureStdio(opts: CaptureOptions, exec: () => void): { stdout: string; stderr: string; }; + +/** + * Captures stdout for the provided execution scope. + */ +export function captureStdout(exec: () => void): string; + +/** + * Captures stdout for the provided execution scope. + */ +export function captureStdout(opts: CaptureOptions, exec: () => void): string; + +/** + * Listens to a provided stream, and executes the provided + * function for every write call. Accepts options to silence + * the output going to the console. + * + * Returns a function to call when you wish to stop listening + * to the call. + */ +export function hook( + stream: NodeJS.WritableStream, + exec: ( + string: string, + encoding?: string, + fd?: (error?: any) => void + ) => void +): () => boolean; + +/** + * Listens to a provided stream, and executes the provided + * function for every write call. Accepts options to silence + * the output going to the console. + * + * Returns a function to call when you wish to stop listening + * to the call. + */ +export function hook( + stream: NodeJS.WritableStream, + opts: CaptureOptions, + exec: ( + string: string, + encoding?: string, + fd?: (error?: any) => void + ) => void +): () => boolean; + +/** + * Delegate to #capture with a quiet passthrough. + */ +export function intercept(stream: NodeJS.WritableStream, exec: () => void): string[]; + +/** + * Delegate to #capture with a quiet passthrough. + */ +export function intercept(stream: NodeJS.WritableStream, opts: CaptureOptions, exec: () => void): string[]; + +/** + * Delegate to #captureStderr with a quiet passthrough. + */ +export function interceptStderr(exec: () => void): string; + +/** + * Delegate to #captureStderr with a quiet passthrough. + */ +export function interceptStderr(opts: CaptureOptions, exec: () => void): string; + +/** + * Delegate to #captureStdio with a quiet passthrough. + */ +export function interceptStdio(exec: () => void): { stdout: string; stderr: string; }; + +/** + * Delegate to #captureStdio with a quiet passthrough. + */ +export function interceptStdio(opts: CaptureOptions, exec: () => void): { stdout: string; stderr: string; }; + +/** + * Delegate to #captureStdout with a quiet passthrough. + */ +export function interceptStdout(exec: () => void): string; + +/** + * Delegate to #captureStdout with a quiet passthrough. + */ +export function interceptStdout(opts: CaptureOptions, exec: () => void): string; + +/** + * Starts a capture on the provided stream using the + * provided options and stream execution. + */ +export function startCapture( + stream: NodeJS.WritableStream, + exec: ( + string: string, + encoding?: string, + fd?: (error?: any) => void + ) => void +): boolean; + +/** + * Starts a capture on the provided stream using the + * provided options and stream execution. + */ +export function startCapture( + stream: NodeJS.WritableStream, + opts: CaptureOptions, + exec: ( + string: string, + encoding?: string, + fd?: (error?: any) => void + ) => void +): boolean; + +/** + * Delegate to #startCapture with a quiet passthrough. + */ +export function startIntercept(stream: NodeJS.WritableStream, exec: () => void): boolean; + +/** + * Delegate to #startCapture with a quiet passthrough. + */ +export function startIntercept(stream: NodeJS.WritableStream, opts: CaptureOptions, exec: () => void): boolean; + +/** + * Stops a capture on the provided stream. + */ +export function stopCapture(stream: NodeJS.WritableStream): boolean; + +/** + * Delegate to #stopCapture with a quiet passthrough. + */ +export function stopIntercept(stream: NodeJS.WritableStream): boolean; diff --git a/types/capture-console/tsconfig.json b/types/capture-console/tsconfig.json new file mode 100644 index 0000000000..01807d6e22 --- /dev/null +++ b/types/capture-console/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "strictFunctionTypes": true + }, + "files": [ + "index.d.ts", + "capture-console-tests.ts" + ] +} \ No newline at end of file diff --git a/types/capture-console/tslint.json b/types/capture-console/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/capture-console/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From a0eb795fa91ac733a3ef832e19ac43778168401d Mon Sep 17 00:00:00 2001 From: Masafumi Koba Date: Tue, 7 Aug 2018 04:07:43 +0900 Subject: [PATCH 42/49] [react-transition-group] Restrict Transition child function's argument type (#27894) > A `function` child can be used instead of a React element. > This function is called with the current transition status > ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used > to apply context specific props to a component. https://github.com/reactjs/react-transition-group/blob/b8da4f2f2314b23a6471d78cb14c22efe13481dd/src/Transition.js#L379 See also #27693 --- types/react-transition-group/Transition.d.ts | 8 +++++++- types/react-transition-group/index.d.ts | 1 + .../react-transition-group-tests.tsx | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/types/react-transition-group/Transition.d.ts b/types/react-transition-group/Transition.d.ts index 123f8b1622..f8722a41d8 100644 --- a/types/react-transition-group/Transition.d.ts +++ b/types/react-transition-group/Transition.d.ts @@ -16,7 +16,13 @@ export interface TransitionActions { exit?: boolean; } -export type TransitionChildren = React.ReactNode | ((status: string) => React.ReactNode); +type TransitionStatus = + typeof ENTERING | + typeof ENTERED | + typeof EXITING | + typeof EXITED | + typeof UNMOUNTED; +export type TransitionChildren = React.ReactNode | ((status: TransitionStatus) => React.ReactNode); export interface TransitionProps extends TransitionActions { in?: boolean; mountOnEnter?: boolean; diff --git a/types/react-transition-group/index.d.ts b/types/react-transition-group/index.d.ts index 785e1f1941..2d97f64ce6 100644 --- a/types/react-transition-group/index.d.ts +++ b/types/react-transition-group/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/reactjs/react-transition-group // Definitions by: Karol Janyst // Epskampie +// Masafumi Koba // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/react-transition-group/react-transition-group-tests.tsx b/types/react-transition-group/react-transition-group-tests.tsx index ce096f3dc7..172d91ce54 100644 --- a/types/react-transition-group/react-transition-group-tests.tsx +++ b/types/react-transition-group/react-transition-group-tests.tsx @@ -52,7 +52,16 @@ const Test: React.StatelessComponent = () => {
{ "test" }
- {(status) =>
{status}
} + {(status) => { + switch (status) { + case ENTERING: + case ENTERED: + case EXITING: + case EXITED: + case UNMOUNTED: + return
{status}
; + } + }}
Date: Tue, 7 Aug 2018 03:08:15 +0800 Subject: [PATCH 43/49] react-i18next: allow React.ReactNode as I18nextProvider's children and I18n's render function return value (#27895) --- types/react-i18next/index.d.ts | 1 + types/react-i18next/src/I18n.d.ts | 2 +- types/react-i18next/src/I18nextProvider.d.ts | 2 +- types/react-i18next/test/react-i18next-tests.tsx | 8 ++++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/types/react-i18next/index.d.ts b/types/react-i18next/index.d.ts index e7b9c88526..979c648f50 100644 --- a/types/react-i18next/index.d.ts +++ b/types/react-i18next/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Giedrius Grabauskas // Simon Baumann // Benedict Etzel +// Wu Haotian // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/react-i18next/src/I18n.d.ts b/types/react-i18next/src/I18n.d.ts index 6bc1cf8f0f..91de868caf 100644 --- a/types/react-i18next/src/I18n.d.ts +++ b/types/react-i18next/src/I18n.d.ts @@ -15,7 +15,7 @@ export interface i18nProps { i18n?: i18n; initialI18nStore?: any; initialLanguage?: string; - children: (t: TranslationFunction, options: Options) => JSX.Element; + children: (t: TranslationFunction, options: Options) => React.ReactNode; } export default class I18n extends React.Component { } diff --git a/types/react-i18next/src/I18nextProvider.d.ts b/types/react-i18next/src/I18nextProvider.d.ts index 2cd4e333e3..2db5d0361b 100644 --- a/types/react-i18next/src/I18nextProvider.d.ts +++ b/types/react-i18next/src/I18nextProvider.d.ts @@ -6,7 +6,7 @@ export interface I18nextProviderProps { i18n: i18n; initialI18nStore?: any; initialLanguage?: string; - children: JSX.Element; + children: React.ReactNode; } export default class I18nextProvider extends React.Component { } diff --git a/types/react-i18next/test/react-i18next-tests.tsx b/types/react-i18next/test/react-i18next-tests.tsx index d3afe7643a..30b95ece24 100644 --- a/types/react-i18next/test/react-i18next-tests.tsx +++ b/types/react-i18next/test/react-i18next-tests.tsx @@ -107,6 +107,10 @@ class App extends React.Component { ; + + 123 +; + loadNamespaces({components: [App], i18n}).then(() => { }).catch(error => { }); @@ -182,6 +186,10 @@ interface CustomTranslateFunctionProps { } ; + + {t => '123'} +; + const defaults: ReactI18NextOptions = { wait: true, withRef: true, From 378202e21677fdd66f7fe13045c1519289afcff4 Mon Sep 17 00:00:00 2001 From: Ange Picard Date: Mon, 6 Aug 2018 21:09:43 +0200 Subject: [PATCH 44/49] [Create] definitions for markdown-pdf (#27897) * Add typings for markdown-pdf * Fix test * Change import style to require. --- types/markdown-pdf/index.d.ts | 92 ++++++++++++++++++++++++ types/markdown-pdf/markdown-pdf-tests.ts | 11 +++ types/markdown-pdf/tsconfig.json | 23 ++++++ types/markdown-pdf/tslint.json | 3 + 4 files changed, 129 insertions(+) create mode 100644 types/markdown-pdf/index.d.ts create mode 100644 types/markdown-pdf/markdown-pdf-tests.ts create mode 100644 types/markdown-pdf/tsconfig.json create mode 100644 types/markdown-pdf/tslint.json diff --git a/types/markdown-pdf/index.d.ts b/types/markdown-pdf/index.d.ts new file mode 100644 index 0000000000..1df6a9f314 --- /dev/null +++ b/types/markdown-pdf/index.d.ts @@ -0,0 +1,92 @@ +// Type definitions for MarkdownPDF (markdown-pdf) 9.0 +// Project: https://github.com/alanshaw/markdown-pdf +// Definitions by: Ange PICARD +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export = MarkdownPDF; + +declare function MarkdownPDF(options?: MarkdownPDF.Options): MarkdownPDF.OptionsBuilder; + +declare namespace MarkdownPDF { + /** Configuration options */ + interface Options { + /** Current working directory. */ + cwd?: string; + /** Path to the phantomjs library. */ + phantomPath?: string; + /** Path to custom CSS file, relative to current directory. */ + cssPath?: string; + /** Path to custorm highlight CSS file (for code highlighting with highlight.js), relative to the current directory. */ + highlightCssPath?: string; + /** Path to CommonJS module which sets the page header and footer (see runnings.js). */ + runningsPath?: string; + /** Delay (in ms) before the PDF is rendered. */ + renderDelay?: number; + /** If renderDelay option isn't set, this is the timeout (in ms) before the page is rendered in case the page.onLoadFinished event doesn't fire. */ + loadTimeout?: number; + /** Supported dimension units are: 'mm', 'cm', 'in', 'px' */ + paperBorder?: string; + paperFormat?: PaperFormat; + paperOrientation?: PaperOrientation; + /** A function that returns a through2 stream that transforms the markdown before it is converted to HTML. */ + preProcessMd?: () => any; + /** A function that returns a through2 stream that transforms the HTML before it is converted to PDF. */ + preProcessHtml?: () => any; + /** A config object that is passed to remarkable, the underlying markdown parser */ + remarkable?: any; // FIXME: remarkable config types + } + type PaperFormat = "A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid"; + type PaperOrientation = "portait" | "landscape"; + + interface OptionsBuilder { + /** Create a readable stream and pipe it to markdown pdf. */ + from: FromOptionsBuilder & FromFunction; + /** Concatenates stream and pipe them to markdown pdf. */ + concat: ConcatOptionsBuilder; + } + + type FromFunction = + /** Create a readable stream from path and pipe to markdown-pdf. path can be a single path or array of paths. */ + (path: string | string[]) => ToOptionsBuilder; + interface FromOptionsBuilder { + /** Create a readable stream from string and pipe to markdown-pdf. string can be a single string or array of strings. */ + string(markdown: string | string[]): ToOptionsBuilder; + /** Create a readable stream from path and pipe to markdown-pdf. path can be a single path or array of paths. */ + path(path: string | string[], opts: any): ToOptionsBuilder; + } + + interface ConcatOptionsBuilder { + from: ConcatFromOptionsBuilder; + } + interface ConcatFromOptionsBuilder { + /** Create and concatenate readable streams from strings and pipe to markdown-pdf. */ + strings(markdownTexts: string[], opts: any): ToOptionsBuilder; + /** Create and concatenate readable streams from paths and pipe to markdown-pdf. */ + paths(paths: string[], opts: any): ToOptionsBuilder; + } + + interface ToOptionsBuilder { + to: ToBuilder & ToFunction; + } + + interface ToBuilder { + /** + * Create a writeable stream to path and pipe output from markdown-pdf to it. + * path can be a single path, or array of output paths if you specified an array of inputs. + * The callback function cb will be invoked when data has finished being written. + */ + path(path: string, callback?: () => void): void; + /** Create a concat-stream and pipe output from markdown-pdf to it. The callback function cb will be invoked when the buffer has been created. */ + buffer(opts: any, callback?: () => void): void; + /** Create a concat-stream and pipe output from markdown-pdf to it. The callback function cb will be invoked when the string has been created. */ + string(opts: any, callback?: () => void): void; + } + + type ToFunction = + /** + * Create a writeable stream to path and pipe output from markdown-pdf to it. + * path can be a single path, or array of output paths if you specified an array of inputs. + * The callback function cb will be invoked when data has finished being written. + */ + (path: string, callback?: () => void) => void; +} diff --git a/types/markdown-pdf/markdown-pdf-tests.ts b/types/markdown-pdf/markdown-pdf-tests.ts new file mode 100644 index 0000000000..429028bf8b --- /dev/null +++ b/types/markdown-pdf/markdown-pdf-tests.ts @@ -0,0 +1,11 @@ +import mdPdf = require('markdown-pdf'); + +mdPdf().from('path').to('path', () => { }); // $ExpectType void +mdPdf().from.string('markdown').to('path', () => { }); // $ExpectType void +mdPdf({ paperOrientation: 'landscape', paperFormat: 'A3' }).from('lol').to('lol', () => { }); // $ExpectType void +mdPdf().concat.from.paths(['lol', 'lol'], {}).to('path', () => { }); // $ExpectType void +mdPdf().concat.from.strings(['lol', 'lol'], {}).to('path', () => { }); // $ExpectType void +mdPdf().from('path').to.path('path', () => { }); // $ExpectType void +mdPdf().from('path').to('path'); // $ExpectType void + +mdPdf({ paperFormat: 'wrongFormat' }); // $ExpectError diff --git a/types/markdown-pdf/tsconfig.json b/types/markdown-pdf/tsconfig.json new file mode 100644 index 0000000000..8ce150383b --- /dev/null +++ b/types/markdown-pdf/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "markdown-pdf-tests.ts" + ] +} diff --git a/types/markdown-pdf/tslint.json b/types/markdown-pdf/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/markdown-pdf/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} From 10bc3fc48a5f762ecf57cf007484eec3cd3f63f6 Mon Sep 17 00:00:00 2001 From: Thomas den Hollander Date: Mon, 6 Aug 2018 21:11:11 +0200 Subject: [PATCH 45/49] Move from namespace to static attributes (#27900) --- .../google-cloud__datastore-tests.ts | 2 +- types/google-cloud__datastore/index.d.ts | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/types/google-cloud__datastore/google-cloud__datastore-tests.ts b/types/google-cloud__datastore/google-cloud__datastore-tests.ts index cb723d0d5b..df48a70f59 100644 --- a/types/google-cloud__datastore/google-cloud__datastore-tests.ts +++ b/types/google-cloud__datastore/google-cloud__datastore-tests.ts @@ -72,7 +72,7 @@ const complexQuery = ds.createQuery('special_namespace', kind) .offset(10); // Running queries: -const queryCallback: QueryCallback = (err: Error, entities: TestEntity[]) => entities[0][Datastore.KEY]; +const queryCallback: QueryCallback = (err: Error, entities: TestEntity[]) => entities[0][ds.KEY]; ds.runQuery(query, queryCallback); ds.runQuery(query, options, queryCallback); diff --git a/types/google-cloud__datastore/index.d.ts b/types/google-cloud__datastore/index.d.ts index e0ef60b4bb..c6b7ed3462 100644 --- a/types/google-cloud__datastore/index.d.ts +++ b/types/google-cloud__datastore/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/googleapis/nodejs-datastore // Definitions by: Antoine Beauvais-Lacasse // Futa Ogawa +// Thomas den Hollander // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 @@ -35,6 +36,15 @@ declare module '@google-cloud/datastore' { import { DatastoreTransaction } from '@google-cloud/datastore/transaction'; class Datastore extends DatastoreRequest_ { + static readonly KEY: unique symbol; + static readonly MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor; + static readonly MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit; + static readonly NO_MORE_RESULTS: NoMoreResults; + + static readonly Query: typeof DatastoreQuery; + static readonly DatastoreRequest: typeof DatastoreRequest_; + static readonly Transaction: typeof DatastoreTransaction; + constructor(options?: InitOptions); readonly KEY: typeof Datastore.KEY; @@ -80,17 +90,6 @@ declare module '@google-cloud/datastore' { keyFilename?: string; credentials?: object; } - - namespace Datastore { - const KEY: unique symbol; - const MORE_RESULTS_AFTER_CURSOR: MoreResultsAfterCursor; - const MORE_RESULTS_AFTER_LIMIT: MoreResultsAfterLimit; - const NO_MORE_RESULTS: NoMoreResults; - - const Query: typeof DatastoreQuery; - const DatastoreRequest: typeof DatastoreRequest_; - const Transaction: typeof DatastoreTransaction; - } } declare module '@google-cloud/datastore/entity' { From 11413d1988d3d7e081dc29e16356a85597885cd9 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 6 Aug 2018 20:13:55 +0100 Subject: [PATCH 46/49] quill: fix signature for clipboard api --- types/quill/index.d.ts | 2 +- types/quill/quill-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/quill/index.d.ts b/types/quill/index.d.ts index 4fdeef44a0..0eda9a4eff 100644 --- a/types/quill/index.d.ts +++ b/types/quill/index.d.ts @@ -43,7 +43,7 @@ export interface KeyboardStatic { } export interface ClipboardStatic { - convert(html: string|Blot): DeltaStatic; + convert(html?: string): DeltaStatic; addMatcher(selectorOrNodeType: string|number, callback: (node: any, delta: DeltaStatic) => DeltaStatic): void; dangerouslyPasteHTML(html: string, source?: Sources): void; dangerouslyPasteHTML(index: number, html: string, source?: Sources): void; diff --git a/types/quill/quill-tests.ts b/types/quill/quill-tests.ts index 96527a8158..073e68f115 100644 --- a/types/quill/quill-tests.ts +++ b/types/quill/quill-tests.ts @@ -148,6 +148,7 @@ function test_setHtmlContents() { const html = "this is a bold text"; const delta = quillEditor.clipboard.convert(html); quillEditor.setContents(delta); + quillEditor.clipboard.convert(); } function test_getSelection() { From 2f341e0c798be97a8bb1fb00ee98feda95db7dce Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Mon, 6 Aug 2018 17:27:14 -0700 Subject: [PATCH 47/49] klaw/v1: Minor cleanup --- types/klaw/v1/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/klaw/v1/index.d.ts b/types/klaw/v1/index.d.ts index 74939f30c2..f65da7af6f 100644 --- a/types/klaw/v1/index.d.ts +++ b/types/klaw/v1/index.d.ts @@ -5,7 +5,7 @@ /// -import * as fs from "fs"; +import { Stats } from "fs"; import { Readable, ReadableOptions } from 'stream'; declare function K(root: string, options?: K.Options): K.Walker; @@ -13,16 +13,16 @@ declare function K(root: string, options?: K.Options): K.Walker; declare namespace K { interface Item { path: string; - stats: fs.Stats; + stats: Stats; } type QueueMethod = "shift" | "pop"; interface Options extends ReadableOptions { queueMethod?: QueueMethod; - pathSorter?: (pathA: string, pathB: string) => number; + pathSorter?(pathA: string, pathB: string): number; fs?: any; // fs or mock-fs - filter?: (path: string) => boolean; + filter?(path: string): boolean; } type Event = "close" | "data" | "end" | "readable" | "error"; From a2bd22304223ec91d802872abadfed07fe6df7fa Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 6 Aug 2018 17:36:51 -0700 Subject: [PATCH 48/49] velocity-animate: Support HTMLCollection in addition to NodeListOf (#27794) --- types/velocity-animate/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/velocity-animate/index.d.ts b/types/velocity-animate/index.d.ts index f6b696870f..24dc53b4be 100644 --- a/types/velocity-animate/index.d.ts +++ b/types/velocity-animate/index.d.ts @@ -87,8 +87,8 @@ declare namespace jquery.velocity { interface VelocityStatic { Sequences: any; mock: any; - animate(options: {elements: NodeListOf; properties: Properties; options: Options}): any; - animate(elements: HTMLElement|NodeListOf, properties: Properties, options: Options): any; + animate(options: {elements: HTMLCollection | NodeListOf; properties: Properties; options: Options}): any; + animate(elements: HTMLElement | HTMLCollection | NodeListOf, properties: Properties, options: Options): any; RegisterEffect(name: string, options: RegisterEffectOptions): VelocityStatic; RunSequence(sequence: SequenceCall[]): VelocityStatic; From 480f7557d281a451302b4f50f1ff3ce0b26aaf8c Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 6 Aug 2018 17:38:22 -0700 Subject: [PATCH 49/49] webappsec-credential-management: Fix lib.dom error (#27797) --- types/webappsec-credential-management/index.d.ts | 3 +++ .../webappsec-credential-management-tests.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts index 9ab3292c3b..ba9058a9a0 100644 --- a/types/webappsec-credential-management/index.d.ts +++ b/types/webappsec-credential-management/index.d.ts @@ -25,6 +25,9 @@ interface GlobalFetch { // variant for navigator.credentials monkey patching fetch(url: Request|string, init?: CMRequestInit): Promise; } +interface WindowOrWorkerGlobalScope { + fetch(url: Request|string, init?: CMRequestInit): Promise; +} /** * Variant of TS 2.2 {@link RequestInit} that permits a diff --git a/types/webappsec-credential-management/webappsec-credential-management-tests.ts b/types/webappsec-credential-management/webappsec-credential-management-tests.ts index 2afa9f8785..9d20ed37dc 100644 --- a/types/webappsec-credential-management/webappsec-credential-management-tests.ts +++ b/types/webappsec-credential-management/webappsec-credential-management-tests.ts @@ -214,7 +214,7 @@ function signOutDeprecated() { } navigator.credentials.requireUserMediation().then(() => { - document.location.assign('/'); + document.location!.assign('/'); }); } @@ -224,7 +224,7 @@ function signOut() { } navigator.credentials.preventSilentAccess().then(() => { - document.location.assign('/'); + document.location!.assign('/'); }); }