{"action":"created","issue":{"url":"https://api.github.com/repos/bokuweb/re-resizable/issues/191","repository_url":"https://api.github.com/repos/bokuweb/re-resizable","labels_url":"https://api.github.com/repos/bokuweb/re-resizable/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/bokuweb/re-resizable/issues/191/comments","events_url":"https://api.github.com/repos/bokuweb/re-resizable/issues/191/events","html_url":"https://github.com/bokuweb/re-resizable/issues/191","id":302385394,"number":191,"title":"Erroned \"index.d.ts\"","user":{"login":"maxleiko","id":834945,"avatar_url":"https://avatars1.githubusercontent.com/u/834945?v=4","gravatar_id":"","url":"https://api.github.com/users/maxleiko","html_url":"https://github.com/maxleiko","followers_url":"https://api.github.com/users/maxleiko/followers","following_url":"https://api.github.com/users/maxleiko/following{/other_user}","gists_url":"https://api.github.com/users/maxleiko/gists{/gist_id}","starred_url":"https://api.github.com/users/maxleiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxleiko/subscriptions","organizations_url":"https://api.github.com/users/maxleiko/orgs","repos_url":"https://api.github.com/users/maxleiko/repos","events_url":"https://api.github.com/users/maxleiko/events{/privacy}","received_events_url":"https://api.github.com/users/maxleiko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-05T17:12:40Z","updated_at":"2018-03-05T17:56:46Z","closed_at":null,"author_association":"NONE","body":"Hi there,\r\n\r\nThis is just a **dev experience** issue about the `index.d.ts` that you provide.  \r\nThis file contains many \"mistakes\" that will make the TypeScript compiler go crazy:\r\n```txt\r\nindex.d.ts(40,13): error TS2300: Duplicate identifier 'HandleComponent'.\r\nindex.d.ts(41,9): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(42,11): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(43,12): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(44,10): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(45,14): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(46,17): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(47,16): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(48,13): error TS2304: Cannot find name 'ReactElement'.\r\nindex.d.ts(54,14): error TS2304: Cannot find name 'ResizeDirection'.\r\nindex.d.ts(61,8): error TS2304: Cannot find name 'ResizeDirection'.\r\nindex.d.ts(67,3): error TS2300: Duplicate identifier 'onResizeStart'.\r\nindex.d.ts(68,3): error TS2300: Duplicate identifier 'onResize'.\r\nindex.d.ts(69,3): error TS2300: Duplicate identifier 'onResizeStop'.\r\nindex.d.ts(102,3): error TS2300: Duplicate identifier 'defaultSize'.\r\nindex.d.ts(125,3): error TS2300: Duplicate identifier 'defaultSize'.\r\nindex.d.ts(130,3): error TS2300: Duplicate identifier 'onResizeStart'.\r\nindex.d.ts(131,3): error TS2300: Duplicate identifier 'onResize'.\r\nindex.d.ts(132,3): error TS2300: Duplicate identifier 'onResizeStop'.\r\nindex.d.ts(137,13): error TS2300: Duplicate identifier 'HandleComponent'.\r\nindex.d.ts(138,15): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(139,17): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(140,18): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(141,16): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(142,20): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(143,23): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(144,22): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\nindex.d.ts(145,19): error TS2694: Namespace 'React' has no exported member 'ElementType'.\r\n```\r\n\r\nI don't know if you automatically generate this `index.d.ts` file from your Flow files or if you wrote it manully, but just in case, this is a correct version of the file:\r\n```ts\r\n// Type definitions for re-resizable 4.4\r\n// Project: https://github.com/bokuweb/re-resizable\r\n// Definitions by: Kalle Ott <https://github.com/kaoDev>\r\n// Definitions: https://github.com/kaoDev/re-resizable\r\n// TypeScript Version: 2.2\r\n\r\nimport * as React from 'react';\r\n\r\nexport type ResizableDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';\r\n\r\nexport interface ResizableState {\r\n  width: number | string;\r\n  height: number | string;\r\n  direction?: ResizableDirection;\r\n  original?: {\r\n    x: number,\r\n    y: number,\r\n    width: number,\r\n    height: number,\r\n  },\r\n  isResizing?: boolean;\r\n  resizeCursor: string,\r\n}\r\n\r\nexport type NumberSize = {\r\n  width: number;\r\n  height: number;\r\n}\r\n\r\nexport type Size = {\r\n  width: string | number,\r\n  height: string | number,\r\n};\r\n\r\nexport type CSSSize = {\r\n  width: string;\r\n  height: string;\r\n}\r\n\r\nexport type ResizeCallback = (\r\n  event: MouseEvent | TouchEvent,\r\n  direction: ResizableDirection,\r\n  elementRef: HTMLElement,\r\n  delta: NumberSize,\r\n) => void;\r\n\r\nexport type ResizeStartCallback = (\r\n  e: React.MouseEvent<any> | React.TouchEvent<any>,\r\n  dir: ResizableDirection,\r\n  elementRef: HTMLElement,\r\n  delta: NumberSize,\r\n) => void;\r\n\r\nexport interface ResizableProps {\r\n  onResizeStart?: ResizeStartCallback,\r\n  onResize?: ResizeCallback,\r\n  onResizeStop?: ResizeCallback,  \r\n  style?: React.CSSProperties;\r\n  handleStyles?: {\r\n    top?: React.CSSProperties,\r\n    right?: React.CSSProperties,\r\n    bottom?: React.CSSProperties,\r\n    left?: React.CSSProperties,\r\n    topRight?: React.CSSProperties,\r\n    bottomRight?: React.CSSProperties,\r\n    bottomLeft?: React.CSSProperties,\r\n    topLeft?: React.CSSProperties,\r\n  },\r\n  handleClasses?: {\r\n    top?: string,\r\n    right?: string,\r\n    bottom?: string,\r\n    left?: string,\r\n    topRight?: string,\r\n    bottomRight?: string,\r\n    bottomLeft?: string,\r\n    topLeft?: string,\r\n  },\r\n  enable?: {\r\n    top?: boolean,\r\n    right?: boolean,\r\n    bottom?: boolean,\r\n    left?: boolean,\r\n    topRight?: boolean,\r\n    bottomRight?: boolean,\r\n    bottomLeft?: boolean,\r\n    topLeft?: boolean,\r\n  },\r\n  className?: string,\r\n  defaultSize?: {\r\n    width: string | number,\r\n    height: string | number,\r\n  },\r\n  size?: {\r\n    width: string | number,\r\n    height: string | number,\r\n  },  \r\n  minWidth?: number | string,\r\n  minHeight?: number | string,\r\n  maxWidth?: number | string,\r\n  maxHeight?: number | string,\r\n  grid?: number[],\r\n  bounds?: 'parent' | 'window' | HTMLElement,\r\n  lockAspectRatio?: boolean,\r\n  lockAspectRatioExtraWidth?: number,\r\n  lockAspectRatioExtraHeight?: number,\r\n  handleWrapperStyle?: {\r\n    width: string | number,\r\n    height: string | number,\r\n  },\r\n  handleWrapperClass?: string,\r\n  handleComponent?: HandleComponent\r\n}\r\n\r\nexport type HandleComponent = {\r\n  top?: React.ReactElement<any>,\r\n  right?: React.ReactElement<any>,\r\n  bottom?: React.ReactElement<any>,\r\n  left?: React.ReactElement<any>,\r\n  topRight?: React.ReactElement<any>,\r\n  bottomRight?: React.ReactElement<any>,\r\n  bottomLeft?: React.ReactElement<any>,\r\n  topLeft?: React.ReactElement<any>,\r\n};\r\n\r\nexport default class Resizable extends React.Component<ResizableProps, ResizableState> {\r\n\r\n  resizable: HTMLElement;\r\n\r\n  size: {\r\n    width: number,\r\n    height: number,\r\n  };\r\n\r\n  updateSize({ width, height }: Size): void;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/bokuweb/re-resizable/issues/comments/370506017","html_url":"https://github.com/bokuweb/re-resizable/issues/191#issuecomment-370506017","issue_url":"https://api.github.com/repos/bokuweb/re-resizable/issues/191","id":370506017,"user":{"login":"Marc22","id":2256932,"avatar_url":"https://avatars2.githubusercontent.com/u/2256932?v=4","gravatar_id":"","url":"https://api.github.com/users/Marc22","html_url":"https://github.com/Marc22","followers_url":"https://api.github.com/users/Marc22/followers","following_url":"https://api.github.com/users/Marc22/following{/other_user}","gists_url":"https://api.github.com/users/Marc22/gists{/gist_id}","starred_url":"https://api.github.com/users/Marc22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marc22/subscriptions","organizations_url":"https://api.github.com/users/Marc22/orgs","repos_url":"https://api.github.com/users/Marc22/repos","events_url":"https://api.github.com/users/Marc22/events{/privacy}","received_events_url":"https://api.github.com/users/Marc22/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T17:56:46Z","updated_at":"2018-03-05T17:56:46Z","author_association":"NONE","body":"I'm running into this as well.  Could this please be updated?"}}
{"actor":{"display_login":"Marc22"}}