├── .editorconfig ├── .gitignore ├── README.md ├── custom-types ├── preact-compat │ └── index.d.ts ├── preact │ └── index.d.ts ├── react-i18next │ ├── index.d.ts │ └── src │ │ ├── context.d.ts │ │ ├── translate.d.ts │ │ └── types.d.ts ├── react │ └── index.d.ts └── redux-form │ ├── index.d.ts │ ├── lib │ └── Field.d.ts │ └── types.d.ts ├── package.json ├── src ├── components │ ├── App.tsx │ ├── Container.tsx │ ├── Greet.tsx │ ├── forms │ │ ├── FieldLevelValidationForm.tsx │ │ ├── SimpleForm.tsx │ │ └── validators.ts │ ├── providers.tsx │ ├── routes.tsx │ └── typed-children.tsx ├── i18n.config.ts ├── main.tsx ├── store.config.ts └── types.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | 61 | # typescript 62 | ts-out 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React - Preact Typescript interop 2 | 3 | > What is this all about ? 4 | 5 | This repo contains custom `preact` and `preact-compat` type definitions, 6 | which are needed for any real life application using `Preact` + `React` libraries with Typescript 7 | 8 | > Why is this here ? 9 | 10 | As preact team is kinda too slow to accept any extensive TS type defs tweaks, customization is needed on your own. 11 | 12 | > Oh btw did I mention that we use this setup in production for last 6 months. Works like a charm ;) ( although many days were spent for figuring things out, but the outcome is magnificient, well I meant 100% type safe code ;) ) 13 | 14 | Good news though! You don't need to look any futher. Just checkout this sh*t and Copy Pasta! Pasta! Obey your Master. Master! 🎶🖖 15 | 16 | ## Interop libraries 17 | 18 | - preact-compat ( custom definitions which extend Preact types ) 19 | - react-router v4 (✌️) 20 | - react-redux (🤘) 21 | - react-18next ( includes custom implementation of latest version ) 22 | - redux-form ( with prop type extension for custom Field types yay! ) 23 | - monkey patched React JSX types to allow `class` HTMLAttribute 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /custom-types/preact-compat/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'preact-compat' { 2 | 3 | } 4 | 5 | import * as Preact from 'preact' 6 | import * as React from 'react' 7 | declare module 'preact' { 8 | type OptionalOriginalVNodeShape = Partial> 9 | interface VNode extends React.ReactElement<{}> {} 10 | 11 | interface Component { 12 | refs: any 13 | base?: HTMLElement 14 | linkState?: (name: string) => (event: Event) => void 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /custom-types/preact/index.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace preact { 2 | // 3 | // React Elements 4 | // ---------------------------------------------------------------------- 5 | 6 | interface ComponentProps | FunctionalComponent> { 7 | children?: VNode[] 8 | key?: string | number | any 9 | ref?: (el: C) => void 10 | } 11 | 12 | interface DangerouslySetInnerHTML { 13 | __html: string 14 | } 15 | 16 | interface PreactHTMLAttributes { 17 | dangerouslySetInnerHTML?: DangerouslySetInnerHTML 18 | key?: string 19 | ref?: (el?: Element) => void 20 | } 21 | 22 | interface VNode

{ 23 | nodeName: ComponentConstructor

| FunctionalComponent

| string 24 | attributes: P 25 | children: VNode[] 26 | key: string 27 | } 28 | // 29 | // React Nodes 30 | // http://facebook.github.io/react/docs/glossary.html 31 | // ---------------------------------------------------------------------- 32 | 33 | type PreactText = string | number 34 | type PreactChild = VNode | PreactText 35 | 36 | // Should be Array but type aliases cannot be recursive 37 | type PreactFragment = {} | Array 38 | type PreactNode = PreactChild | PreactFragment | boolean | null | undefined 39 | 40 | interface ComponentLifecycle { 41 | componentWillMount?(): void 42 | componentDidMount?(): void 43 | componentWillUnmount?(): void 44 | componentWillReceiveProps?(nextProps: P, nextContext: any): void 45 | shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean 46 | componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void 47 | componentDidUpdate?(previousProps: P, previousState: S, previousContext: any): void 48 | } 49 | 50 | interface FunctionalComponent

{ 51 | (props?: Readonly<{ children?: PreactNode }> & Readonly

, context?: any): JSX.Element 52 | displayName?: string 53 | defaultProps?: Partial

54 | } 55 | 56 | interface ComponentConstructor

{ 57 | new (props?: P, context?: any): Component 58 | } 59 | 60 | interface ChildContextProvider { 61 | getChildContext(): C 62 | } 63 | 64 | // Type alias for a component considered generally, whether stateless or stateful. 65 | type AnyComponent

= FunctionalComponent

| typeof Component 66 | 67 | abstract class Component { 68 | constructor(props?: P, context?: any) 69 | 70 | static displayName?: string 71 | static defaultProps?: any 72 | 73 | state: S 74 | // props: P & ComponentProps 75 | props: Readonly<{ children?: PreactNode }> & Readonly

76 | context: any 77 | base: HTMLElement 78 | 79 | linkState: (name: string) => (event: Event) => void 80 | 81 | setState(state: Pick, callback?: () => void): void 82 | setState(fn: (prevState: S, props: P) => Pick, callback?: () => void): void 83 | 84 | forceUpdate(callback?: () => void): void 85 | 86 | abstract render(props?: P & ComponentProps, state?: S, context?: any): JSX.Element | null | false 87 | } 88 | interface Component

extends ComponentLifecycle {} 89 | 90 | function h( 91 | node: ComponentConstructor | FunctionalComponent, 92 | params: PropsType, 93 | ...children: (JSX.Element | JSX.Element[] | string)[] 94 | ): JSX.Element 95 | function h( 96 | node: string, 97 | params: JSX.HTMLAttributes & JSX.SVGAttributes & { [propName: string]: any }, 98 | ...children: (JSX.Element | JSX.Element[] | string)[] 99 | ): JSX.Element 100 | function render(node: JSX.Element, parent: Element | Document | null, mergeWith?: Element): Element 101 | function rerender(): void 102 | function cloneElement(element: JSX.Element, props: any): JSX.Element 103 | 104 | var options: { 105 | syncComponentUpdates?: boolean 106 | debounceRendering?: (render: () => void) => void 107 | vnode?: (vnode: VNode) => void 108 | event?: (event: Event) => Event 109 | } 110 | 111 | // JSX Related 112 | // ---------------------- 113 | 114 | interface SVGAttributes extends HTMLAttributes { 115 | accentHeight?: number | string 116 | accumulate?: 'none' | 'sum' 117 | additive?: 'replace' | 'sum' 118 | alignmentBaseline?: 119 | | 'auto' 120 | | 'baseline' 121 | | 'before-edge' 122 | | 'text-before-edge' 123 | | 'middle' 124 | | 'central' 125 | | 'after-edge' 126 | | 'text-after-edge' 127 | | 'ideographic' 128 | | 'alphabetic' 129 | | 'hanging' 130 | | 'mathematical' 131 | | 'inherit' 132 | allowReorder?: 'no' | 'yes' 133 | alphabetic?: number | string 134 | amplitude?: number | string 135 | arabicForm?: 'initial' | 'medial' | 'terminal' | 'isolated' 136 | ascent?: number | string 137 | attributeName?: string 138 | attributeType?: string 139 | autoReverse?: number | string 140 | azimuth?: number | string 141 | baseFrequency?: number | string 142 | baselineShift?: number | string 143 | baseProfile?: number | string 144 | bbox?: number | string 145 | begin?: number | string 146 | bias?: number | string 147 | by?: number | string 148 | calcMode?: number | string 149 | capHeight?: number | string 150 | clip?: number | string 151 | clipPath?: string 152 | clipPathUnits?: number | string 153 | clipRule?: number | string 154 | colorInterpolation?: number | string 155 | colorInterpolationFilters?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit' 156 | colorProfile?: number | string 157 | colorRendering?: number | string 158 | contentScriptType?: number | string 159 | contentStyleType?: number | string 160 | cursor?: number | string 161 | cx?: number | string 162 | cy?: number | string 163 | d?: string 164 | decelerate?: number | string 165 | descent?: number | string 166 | diffuseConstant?: number | string 167 | direction?: number | string 168 | display?: number | string 169 | divisor?: number | string 170 | dominantBaseline?: number | string 171 | dur?: number | string 172 | dx?: number | string 173 | dy?: number | string 174 | edgeMode?: number | string 175 | elevation?: number | string 176 | enableBackground?: number | string 177 | end?: number | string 178 | exponent?: number | string 179 | externalResourcesRequired?: number | string 180 | fill?: string 181 | fillOpacity?: number | string 182 | fillRule?: 'nonzero' | 'evenodd' | 'inherit' 183 | filter?: string 184 | filterRes?: number | string 185 | filterUnits?: number | string 186 | floodColor?: number | string 187 | floodOpacity?: number | string 188 | focusable?: number | string 189 | fontFamily?: string 190 | fontSize?: number | string 191 | fontSizeAdjust?: number | string 192 | fontStretch?: number | string 193 | fontStyle?: number | string 194 | fontVariant?: number | string 195 | fontWeight?: number | string 196 | format?: number | string 197 | from?: number | string 198 | fx?: number | string 199 | fy?: number | string 200 | g1?: number | string 201 | g2?: number | string 202 | glyphName?: number | string 203 | glyphOrientationHorizontal?: number | string 204 | glyphOrientationVertical?: number | string 205 | glyphRef?: number | string 206 | gradientTransform?: string 207 | gradientUnits?: string 208 | hanging?: number | string 209 | horizAdvX?: number | string 210 | horizOriginX?: number | string 211 | ideographic?: number | string 212 | imageRendering?: number | string 213 | in2?: number | string 214 | in?: string 215 | intercept?: number | string 216 | k1?: number | string 217 | k2?: number | string 218 | k3?: number | string 219 | k4?: number | string 220 | k?: number | string 221 | kernelMatrix?: number | string 222 | kernelUnitLength?: number | string 223 | kerning?: number | string 224 | keyPoints?: number | string 225 | keySplines?: number | string 226 | keyTimes?: number | string 227 | lengthAdjust?: number | string 228 | letterSpacing?: number | string 229 | lightingColor?: number | string 230 | limitingConeAngle?: number | string 231 | local?: number | string 232 | markerEnd?: string 233 | markerHeight?: number | string 234 | markerMid?: string 235 | markerStart?: string 236 | markerUnits?: number | string 237 | markerWidth?: number | string 238 | mask?: string 239 | maskContentUnits?: number | string 240 | maskUnits?: number | string 241 | mathematical?: number | string 242 | mode?: number | string 243 | numOctaves?: number | string 244 | offset?: number | string 245 | opacity?: number | string 246 | operator?: number | string 247 | order?: number | string 248 | orient?: number | string 249 | orientation?: number | string 250 | origin?: number | string 251 | overflow?: number | string 252 | overlinePosition?: number | string 253 | overlineThickness?: number | string 254 | paintOrder?: number | string 255 | panose1?: number | string 256 | pathLength?: number | string 257 | patternContentUnits?: string 258 | patternTransform?: number | string 259 | patternUnits?: string 260 | pointerEvents?: number | string 261 | points?: string 262 | pointsAtX?: number | string 263 | pointsAtY?: number | string 264 | pointsAtZ?: number | string 265 | preserveAlpha?: number | string 266 | preserveAspectRatio?: string 267 | primitiveUnits?: number | string 268 | r?: number | string 269 | radius?: number | string 270 | refX?: number | string 271 | refY?: number | string 272 | renderingIntent?: number | string 273 | repeatCount?: number | string 274 | repeatDur?: number | string 275 | requiredExtensions?: number | string 276 | requiredFeatures?: number | string 277 | restart?: number | string 278 | result?: string 279 | rotate?: number | string 280 | rx?: number | string 281 | ry?: number | string 282 | scale?: number | string 283 | seed?: number | string 284 | shapeRendering?: number | string 285 | slope?: number | string 286 | spacing?: number | string 287 | specularConstant?: number | string 288 | specularExponent?: number | string 289 | speed?: number | string 290 | spreadMethod?: string 291 | startOffset?: number | string 292 | stdDeviation?: number | string 293 | stemh?: number | string 294 | stemv?: number | string 295 | stitchTiles?: number | string 296 | stopColor?: string 297 | stopOpacity?: number | string 298 | strikethroughPosition?: number | string 299 | strikethroughThickness?: number | string 300 | string?: number | string 301 | stroke?: string 302 | strokeDasharray?: string | number 303 | strokeDashoffset?: string | number 304 | strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit' 305 | strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit' 306 | strokeMiterlimit?: string 307 | strokeOpacity?: number | string 308 | strokeWidth?: number | string 309 | surfaceScale?: number | string 310 | systemLanguage?: number | string 311 | tableValues?: number | string 312 | targetX?: number | string 313 | targetY?: number | string 314 | textAnchor?: string 315 | textDecoration?: number | string 316 | textLength?: number | string 317 | textRendering?: number | string 318 | to?: number | string 319 | transform?: string 320 | u1?: number | string 321 | u2?: number | string 322 | underlinePosition?: number | string 323 | underlineThickness?: number | string 324 | unicode?: number | string 325 | unicodeBidi?: number | string 326 | unicodeRange?: number | string 327 | unitsPerEm?: number | string 328 | vAlphabetic?: number | string 329 | values?: string 330 | vectorEffect?: number | string 331 | version?: string 332 | vertAdvY?: number | string 333 | vertOriginX?: number | string 334 | vertOriginY?: number | string 335 | vHanging?: number | string 336 | vIdeographic?: number | string 337 | viewBox?: string 338 | viewTarget?: number | string 339 | visibility?: number | string 340 | vMathematical?: number | string 341 | widths?: number | string 342 | wordSpacing?: number | string 343 | writingMode?: number | string 344 | x1?: number | string 345 | x2?: number | string 346 | x?: number | string 347 | xChannelSelector?: string 348 | xHeight?: number | string 349 | xlinkActuate?: string 350 | xlinkArcrole?: string 351 | xlinkHref?: string 352 | xlinkRole?: string 353 | xlinkShow?: string 354 | xlinkTitle?: string 355 | xlinkType?: string 356 | xmlBase?: string 357 | xmlLang?: string 358 | xmlns?: string 359 | xmlnsXlink?: string 360 | xmlSpace?: string 361 | y1?: number | string 362 | y2?: number | string 363 | y?: number | string 364 | yChannelSelector?: string 365 | z?: number | string 366 | zoomAndPan?: string 367 | } 368 | 369 | interface PathAttributes { 370 | d: string 371 | } 372 | 373 | interface EventHandler { 374 | (event: E): void 375 | } 376 | 377 | type ClipboardEventHandler = EventHandler 378 | type CompositionEventHandler = EventHandler 379 | type DragEventHandler = EventHandler 380 | type FocusEventHandler = EventHandler 381 | type KeyboardEventHandler = EventHandler 382 | type MouseEventHandler = EventHandler 383 | type TouchEventHandler = EventHandler 384 | type UIEventHandler = EventHandler 385 | type WheelEventHandler = EventHandler 386 | type AnimationEventHandler = EventHandler 387 | type TransitionEventHandler = EventHandler 388 | type GenericEventHandler = EventHandler 389 | 390 | interface DOMAttributes { 391 | children?: PreactNode 392 | dangerouslySetInnerHTML?: { 393 | __html: string 394 | } 395 | 396 | // Image Events 397 | onLoad?: GenericEventHandler 398 | 399 | // Clipboard Events 400 | onCopy?: ClipboardEventHandler 401 | onCut?: ClipboardEventHandler 402 | onPaste?: ClipboardEventHandler 403 | 404 | // Composition Events 405 | onCompositionEnd?: CompositionEventHandler 406 | onCompositionStart?: CompositionEventHandler 407 | onCompositionUpdate?: CompositionEventHandler 408 | 409 | // Focus Events 410 | onFocus?: FocusEventHandler 411 | onBlur?: FocusEventHandler 412 | 413 | // Form Events 414 | onChange?: GenericEventHandler 415 | onInput?: GenericEventHandler 416 | onSearch?: GenericEventHandler 417 | onSubmit?: GenericEventHandler 418 | 419 | // Keyboard Events 420 | onKeyDown?: KeyboardEventHandler 421 | onKeyPress?: KeyboardEventHandler 422 | onKeyUp?: KeyboardEventHandler 423 | 424 | // Media Events 425 | onAbort?: GenericEventHandler 426 | onCanPlay?: GenericEventHandler 427 | onCanPlayThrough?: GenericEventHandler 428 | onDurationChange?: GenericEventHandler 429 | onEmptied?: GenericEventHandler 430 | onEncrypted?: GenericEventHandler 431 | onEnded?: GenericEventHandler 432 | onLoadedData?: GenericEventHandler 433 | onLoadedMetadata?: GenericEventHandler 434 | onLoadStart?: GenericEventHandler 435 | onPause?: GenericEventHandler 436 | onPlay?: GenericEventHandler 437 | onPlaying?: GenericEventHandler 438 | onProgress?: GenericEventHandler 439 | onRateChange?: GenericEventHandler 440 | onSeeked?: GenericEventHandler 441 | onSeeking?: GenericEventHandler 442 | onStalled?: GenericEventHandler 443 | onSuspend?: GenericEventHandler 444 | onTimeUpdate?: GenericEventHandler 445 | onVolumeChange?: GenericEventHandler 446 | onWaiting?: GenericEventHandler 447 | 448 | // MouseEvents 449 | onClick?: MouseEventHandler 450 | onContextMenu?: MouseEventHandler 451 | onDblClick?: MouseEventHandler 452 | onDrag?: DragEventHandler 453 | onDragEnd?: DragEventHandler 454 | onDragEnter?: DragEventHandler 455 | onDragExit?: DragEventHandler 456 | onDragLeave?: DragEventHandler 457 | onDragOver?: DragEventHandler 458 | onDragStart?: DragEventHandler 459 | onDrop?: DragEventHandler 460 | onMouseDown?: MouseEventHandler 461 | onMouseEnter?: MouseEventHandler 462 | onMouseLeave?: MouseEventHandler 463 | onMouseMove?: MouseEventHandler 464 | onMouseOut?: MouseEventHandler 465 | onMouseOver?: MouseEventHandler 466 | onMouseUp?: MouseEventHandler 467 | 468 | // Selection Events 469 | onSelect?: GenericEventHandler 470 | 471 | // Touch Events 472 | onTouchCancel?: TouchEventHandler 473 | onTouchEnd?: TouchEventHandler 474 | onTouchMove?: TouchEventHandler 475 | onTouchStart?: TouchEventHandler 476 | 477 | // UI Events 478 | onScroll?: UIEventHandler 479 | 480 | // Wheel Events 481 | onWheel?: WheelEventHandler 482 | 483 | // Animation Events 484 | onAnimationStart?: AnimationEventHandler 485 | onAnimationEnd?: AnimationEventHandler 486 | onAnimationIteration?: AnimationEventHandler 487 | 488 | // Transition Events 489 | onTransitionEnd?: TransitionEventHandler 490 | } 491 | 492 | interface HTMLAttributes extends preact.PreactHTMLAttributes, DOMAttributes { 493 | // Standard HTML Attributes 494 | accept?: string 495 | acceptCharset?: string 496 | accessKey?: string 497 | action?: string 498 | allowFullScreen?: boolean 499 | allowTransparency?: boolean 500 | alt?: string 501 | async?: boolean 502 | autocomplete?: string 503 | autofocus?: boolean 504 | autoPlay?: boolean 505 | capture?: boolean 506 | cellPadding?: number | string 507 | cellSpacing?: number | string 508 | charSet?: string 509 | challenge?: string 510 | checked?: boolean 511 | class?: string 512 | className?: string 513 | cols?: number 514 | colSpan?: number 515 | content?: string 516 | contentEditable?: boolean 517 | contextMenu?: string 518 | controls?: boolean 519 | coords?: string 520 | crossOrigin?: string 521 | data?: string 522 | dateTime?: string 523 | default?: boolean 524 | defer?: boolean 525 | dir?: string 526 | disabled?: boolean 527 | download?: any 528 | draggable?: boolean 529 | encType?: string 530 | form?: string 531 | formAction?: string 532 | formEncType?: string 533 | formMethod?: string 534 | formNoValidate?: boolean 535 | formTarget?: string 536 | frameBorder?: number | string 537 | headers?: string 538 | height?: number | string 539 | hidden?: boolean 540 | high?: number 541 | href?: string 542 | hrefLang?: string 543 | for?: string 544 | httpEquiv?: string 545 | icon?: string 546 | id?: string 547 | inputMode?: string 548 | integrity?: string 549 | is?: string 550 | keyParams?: string 551 | keyType?: string 552 | kind?: string 553 | label?: string 554 | lang?: string 555 | list?: string 556 | loop?: boolean 557 | low?: number 558 | manifest?: string 559 | marginHeight?: number 560 | marginWidth?: number 561 | max?: number | string 562 | maxLength?: number 563 | media?: string 564 | mediaGroup?: string 565 | method?: string 566 | min?: number | string 567 | minLength?: number 568 | multiple?: boolean 569 | muted?: boolean 570 | name?: string 571 | noValidate?: boolean 572 | open?: boolean 573 | optimum?: number 574 | pattern?: string 575 | placeholder?: string 576 | poster?: string 577 | preload?: string 578 | radioGroup?: string 579 | readOnly?: boolean 580 | rel?: string 581 | required?: boolean 582 | role?: string 583 | rows?: number 584 | rowSpan?: number 585 | sandbox?: string 586 | scope?: string 587 | scoped?: boolean 588 | scrolling?: string 589 | seamless?: boolean 590 | selected?: boolean 591 | shape?: string 592 | size?: number 593 | sizes?: string 594 | slot?: string 595 | span?: number 596 | spellCheck?: boolean 597 | src?: string 598 | srcset?: string 599 | srcDoc?: string 600 | srcLang?: string 601 | srcSet?: string 602 | start?: number 603 | step?: number | string 604 | style?: any 605 | summary?: string 606 | tabIndex?: number 607 | target?: string 608 | title?: string 609 | type?: string 610 | useMap?: string 611 | value?: string | string[] 612 | width?: number | string 613 | wmode?: string 614 | wrap?: string 615 | 616 | // RDFa Attributes 617 | about?: string 618 | datatype?: string 619 | inlist?: any 620 | prefix?: string 621 | property?: string 622 | resource?: string 623 | typeof?: string 624 | vocab?: string 625 | } 626 | } 627 | 628 | declare module 'preact' { 629 | export = preact 630 | } 631 | 632 | declare global { 633 | namespace JSX { 634 | interface Element extends preact.VNode {} 635 | 636 | interface ElementClass extends preact.Component {} 637 | 638 | interface ElementAttributesProperty { 639 | props: {} 640 | } 641 | 642 | interface ElementChildrenAttribute { 643 | children: {} 644 | } 645 | 646 | interface IntrinsicElements { 647 | // HTML 648 | a: preact.HTMLAttributes 649 | abbr: preact.HTMLAttributes 650 | address: preact.HTMLAttributes 651 | area: preact.HTMLAttributes 652 | article: preact.HTMLAttributes 653 | aside: preact.HTMLAttributes 654 | audio: preact.HTMLAttributes 655 | b: preact.HTMLAttributes 656 | base: preact.HTMLAttributes 657 | bdi: preact.HTMLAttributes 658 | bdo: preact.HTMLAttributes 659 | big: preact.HTMLAttributes 660 | blockquote: preact.HTMLAttributes 661 | body: preact.HTMLAttributes 662 | br: preact.HTMLAttributes 663 | button: preact.HTMLAttributes 664 | canvas: preact.HTMLAttributes 665 | caption: preact.HTMLAttributes 666 | cite: preact.HTMLAttributes 667 | code: preact.HTMLAttributes 668 | col: preact.HTMLAttributes 669 | colgroup: preact.HTMLAttributes 670 | data: preact.HTMLAttributes 671 | datalist: preact.HTMLAttributes 672 | dd: preact.HTMLAttributes 673 | del: preact.HTMLAttributes 674 | details: preact.HTMLAttributes 675 | dfn: preact.HTMLAttributes 676 | dialog: preact.HTMLAttributes 677 | div: preact.HTMLAttributes 678 | dl: preact.HTMLAttributes 679 | dt: preact.HTMLAttributes 680 | em: preact.HTMLAttributes 681 | embed: preact.HTMLAttributes 682 | fieldset: preact.HTMLAttributes 683 | figcaption: preact.HTMLAttributes 684 | figure: preact.HTMLAttributes 685 | footer: preact.HTMLAttributes 686 | form: preact.HTMLAttributes 687 | h1: preact.HTMLAttributes 688 | h2: preact.HTMLAttributes 689 | h3: preact.HTMLAttributes 690 | h4: preact.HTMLAttributes 691 | h5: preact.HTMLAttributes 692 | h6: preact.HTMLAttributes 693 | head: preact.HTMLAttributes 694 | header: preact.HTMLAttributes 695 | hr: preact.HTMLAttributes 696 | html: preact.HTMLAttributes 697 | i: preact.HTMLAttributes 698 | iframe: preact.HTMLAttributes 699 | img: preact.HTMLAttributes 700 | input: preact.HTMLAttributes 701 | ins: preact.HTMLAttributes 702 | kbd: preact.HTMLAttributes 703 | keygen: preact.HTMLAttributes 704 | label: preact.HTMLAttributes 705 | legend: preact.HTMLAttributes 706 | li: preact.HTMLAttributes 707 | link: preact.HTMLAttributes 708 | main: preact.HTMLAttributes 709 | map: preact.HTMLAttributes 710 | mark: preact.HTMLAttributes 711 | menu: preact.HTMLAttributes 712 | menuitem: preact.HTMLAttributes 713 | meta: preact.HTMLAttributes 714 | meter: preact.HTMLAttributes 715 | nav: preact.HTMLAttributes 716 | noscript: preact.HTMLAttributes 717 | object: preact.HTMLAttributes 718 | ol: preact.HTMLAttributes 719 | optgroup: preact.HTMLAttributes 720 | option: preact.HTMLAttributes 721 | output: preact.HTMLAttributes 722 | p: preact.HTMLAttributes 723 | param: preact.HTMLAttributes 724 | picture: preact.HTMLAttributes 725 | pre: preact.HTMLAttributes 726 | progress: preact.HTMLAttributes 727 | q: preact.HTMLAttributes 728 | rp: preact.HTMLAttributes 729 | rt: preact.HTMLAttributes 730 | ruby: preact.HTMLAttributes 731 | s: preact.HTMLAttributes 732 | samp: preact.HTMLAttributes 733 | script: preact.HTMLAttributes 734 | section: preact.HTMLAttributes 735 | select: preact.HTMLAttributes 736 | slot: preact.HTMLAttributes 737 | small: preact.HTMLAttributes 738 | source: preact.HTMLAttributes 739 | span: preact.HTMLAttributes 740 | strong: preact.HTMLAttributes 741 | style: preact.HTMLAttributes 742 | sub: preact.HTMLAttributes 743 | summary: preact.HTMLAttributes 744 | sup: preact.HTMLAttributes 745 | table: preact.HTMLAttributes 746 | tbody: preact.HTMLAttributes 747 | td: preact.HTMLAttributes 748 | textarea: preact.HTMLAttributes 749 | tfoot: preact.HTMLAttributes 750 | th: preact.HTMLAttributes 751 | thead: preact.HTMLAttributes 752 | time: preact.HTMLAttributes 753 | title: preact.HTMLAttributes 754 | tr: preact.HTMLAttributes 755 | track: preact.HTMLAttributes 756 | u: preact.HTMLAttributes 757 | ul: preact.HTMLAttributes 758 | var: preact.HTMLAttributes 759 | video: preact.HTMLAttributes 760 | wbr: preact.HTMLAttributes 761 | 762 | //SVG 763 | svg: preact.SVGAttributes 764 | animate: preact.SVGAttributes 765 | circle: preact.SVGAttributes 766 | clipPath: preact.SVGAttributes 767 | defs: preact.SVGAttributes 768 | ellipse: preact.SVGAttributes 769 | feBlend: preact.SVGAttributes 770 | feColorMatrix: preact.SVGAttributes 771 | feComponentTransfer: preact.SVGAttributes 772 | feComposite: preact.SVGAttributes 773 | feConvolveMatrix: preact.SVGAttributes 774 | feDiffuseLighting: preact.SVGAttributes 775 | feDisplacementMap: preact.SVGAttributes 776 | feFlood: preact.SVGAttributes 777 | feGaussianBlur: preact.SVGAttributes 778 | feImage: preact.SVGAttributes 779 | feMerge: preact.SVGAttributes 780 | feMergeNode: preact.SVGAttributes 781 | feMorphology: preact.SVGAttributes 782 | feOffset: preact.SVGAttributes 783 | feSpecularLighting: preact.SVGAttributes 784 | feTile: preact.SVGAttributes 785 | feTurbulence: preact.SVGAttributes 786 | filter: preact.SVGAttributes 787 | foreignObject: preact.SVGAttributes 788 | g: preact.SVGAttributes 789 | image: preact.SVGAttributes 790 | line: preact.SVGAttributes 791 | linearGradient: preact.SVGAttributes 792 | marker: preact.SVGAttributes 793 | mask: preact.SVGAttributes 794 | path: preact.SVGAttributes 795 | pattern: preact.SVGAttributes 796 | polygon: preact.SVGAttributes 797 | polyline: preact.SVGAttributes 798 | radialGradient: preact.SVGAttributes 799 | rect: preact.SVGAttributes 800 | stop: preact.SVGAttributes 801 | symbol: preact.SVGAttributes 802 | text: preact.SVGAttributes 803 | tspan: preact.SVGAttributes 804 | use: preact.SVGAttributes 805 | } 806 | } 807 | } 808 | -------------------------------------------------------------------------------- /custom-types/react-i18next/index.d.ts: -------------------------------------------------------------------------------- 1 | // "name": "react-i18next", 2 | // "version": "6.0.6", 3 | import * as I18next from 'i18next' 4 | import * as React from 'react' 5 | import { InferableComponentEnhancer } from 'react-redux' 6 | // import translate from './src/translate' 7 | 8 | declare module 'react-i18next' { 9 | export interface InjectedI18nProps { 10 | t: I18next.TranslationFunction 11 | i18n: I18next.i18n 12 | } 13 | 14 | export function translate( 15 | namespaces?: TKey[] | TKey, 16 | options?: TranslateOptions 17 | ): InferableComponentEnhancer 18 | 19 | // export { translate } from './src/translate.d.ts' 20 | export { reactI18nextModule, setDefaults, getDefaults, setI18n, getI18n } from './src/context' 21 | } 22 | -------------------------------------------------------------------------------- /custom-types/react-i18next/src/context.d.ts: -------------------------------------------------------------------------------- 1 | import * as I18next from 'i18next' 2 | import * as ReactI18n from 'react-i18next' 3 | 4 | export interface TranslateOptions { 5 | withRef: boolean 6 | bindI18n: string 7 | bindStore: string 8 | wait: boolean 9 | translateFuncName: 't' | string 10 | nsMode: string | 'default' 11 | } 12 | export const reactI18nextModule: { 13 | type: '3rdParty' 14 | 15 | init(instance: I18next.i18n): void 16 | } 17 | export function setDefaults(options: Partial): void 18 | export function getDefaults(): TranslateOptions 19 | export function setI18n(instance: I18next.i18n): void 20 | export function getI18n(): I18next.i18n 21 | -------------------------------------------------------------------------------- /custom-types/react-i18next/src/translate.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { InferableComponentEnhancer } from 'react-redux' 3 | import { i18n, TranslationFunction } from 'i18next' 4 | 5 | export interface TranslateOptions { 6 | withRef?: boolean 7 | bindI18n?: string 8 | bindStore?: string 9 | translateFuncName?: string 10 | wait?: boolean 11 | nsMode?: string 12 | i18n?: i18n 13 | } 14 | 15 | export interface InjectedProps { 16 | t: TranslationFunction 17 | i18n: i18n 18 | } 19 | 20 | export default function translate( 21 | namespaces?: TKey[] | TKey, 22 | options?: TranslateOptions 23 | ): InferableComponentEnhancer 24 | -------------------------------------------------------------------------------- /custom-types/react-i18next/src/types.d.ts: -------------------------------------------------------------------------------- 1 | import * as I18next from 'i18next' 2 | 3 | export interface InjectedI18nProps { 4 | t: I18next.TranslationFunction 5 | i18n: I18next.i18n 6 | } 7 | -------------------------------------------------------------------------------- /custom-types/react/index.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | declare module 'react' { 4 | interface PreactVDomAttributes { 5 | class?: string 6 | } 7 | interface HTMLAttributes extends React.DOMAttributes, PreactVDomAttributes {} 8 | } 9 | -------------------------------------------------------------------------------- /custom-types/redux-form/index.d.ts: -------------------------------------------------------------------------------- 1 | // import * as React from 'react' 2 | // import * as ReduxForm from 'redux-form' 3 | // declare module 'redux-form' { 4 | // // interface CustomFieldProps { 5 | // // label: string 6 | // // } 7 | // // type foo = ReduxForm.FieldsProps<{}> 8 | // // interface BaseFieldsProps

extends CustomFieldProps {} 9 | // // interface BaseFieldProps

extends Partial {} 10 | // // interface GenericField

extends React.Component {} 11 | // // interface Field

extends React.Component {} 12 | // // class Field

extends React.Component {} 13 | // // export interface WrappedFieldProps /* extends CustomFieldProps */ { 14 | // // label: string 15 | // // } 16 | // // export = ReduxForm 17 | // } 18 | -------------------------------------------------------------------------------- /custom-types/redux-form/lib/Field.d.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, 3 | ComponentType, 4 | ReactElement, 5 | ChangeEvent, 6 | DragEvent, 7 | FocusEvent, 8 | InputHTMLAttributes, 9 | SelectHTMLAttributes, 10 | TextareaHTMLAttributes, 11 | } from 'react' 12 | import { Dispatch } from 'redux' 13 | 14 | import { CustomFieldProps } from '../types' 15 | 16 | export type Normalizer = (value: any, previousValue?: any, allValues?: any, previousAllValues?: any) => any 17 | export type Formatter = (value: any, name: string) => any 18 | export type Parser = (value: any, name: string) => any 19 | export type Validator = (value: any, allValues?: any, props?: any) => any 20 | 21 | interface EventHandler { 22 | (event: Event): void 23 | } 24 | 25 | interface EventOrValueHandler extends EventHandler { 26 | (value: any): void 27 | } 28 | 29 | interface CommonFieldProps { 30 | name: string 31 | onBlur: EventOrValueHandler> 32 | onChange: EventOrValueHandler> 33 | onDragStart: EventHandler> 34 | onDrop: EventHandler> 35 | onFocus: EventHandler> 36 | } 37 | 38 | interface BaseFieldProps

extends Partial, Partial { 39 | name: string 40 | component?: ComponentType

| 'input' | 'select' | 'textarea' 41 | format?: Formatter | null 42 | normalize?: Normalizer 43 | props?: P 44 | parse?: Parser 45 | validate?: Validator | Validator[] 46 | warn?: Validator | Validator[] 47 | withRef?: boolean 48 | } 49 | 50 | export interface GenericField

extends Component & P> { 51 | dirty: boolean 52 | name: string 53 | pristine: boolean 54 | value: any 55 | getRenderedComponent(): Component 56 | } 57 | 58 | type GenericFieldHTMLAttributes = 59 | | InputHTMLAttributes 60 | | SelectHTMLAttributes 61 | | TextareaHTMLAttributes 62 | 63 | export class Field

extends Component & P> implements GenericField

{ 64 | dirty: boolean 65 | name: string 66 | pristine: boolean 67 | value: any 68 | getRenderedComponent(): Component 69 | } 70 | 71 | export interface WrappedFieldProps extends Partial { 72 | input: WrappedFieldInputProps 73 | meta: WrappedFieldMetaProps 74 | } 75 | 76 | export interface WrappedFieldInputProps extends CommonFieldProps { 77 | checked?: boolean 78 | value: any 79 | } 80 | 81 | export interface WrappedFieldMetaProps { 82 | active?: boolean 83 | autofilled: boolean 84 | asyncValidating: boolean 85 | dirty: boolean 86 | dispatch: Dispatch 87 | error?: any 88 | form: string 89 | initial: any 90 | invalid: boolean 91 | pristine: boolean 92 | submitting: boolean 93 | submitFailed: boolean 94 | touched: boolean 95 | valid: boolean 96 | visited: boolean 97 | warning?: any 98 | } 99 | 100 | export default Field 101 | -------------------------------------------------------------------------------- /custom-types/redux-form/types.d.ts: -------------------------------------------------------------------------------- 1 | export interface CustomFieldProps { 2 | label: string 3 | type: string 4 | } 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-preact-ts", 3 | "private": true, 4 | "version": "1.0.0", 5 | "main": "index.js", 6 | "author": "Martin Hochel ", 7 | "license": "MIT", 8 | "devDependencies": { 9 | "@types/i18next-browser-languagedetector": "2.0.0", 10 | "@types/i18next-xhr-backend": "1.4.0", 11 | "@types/react": "15.6.5", 12 | "@types/react-i18next": "4.6.0", 13 | "@types/react-redux": "5.0.10", 14 | "@types/react-router-dom": "4.0.8", 15 | "@types/redux-form": "7.0.6", 16 | "typescript": "2.5.3" 17 | }, 18 | "dependencies": { 19 | "preact": "8.2.5", 20 | "preact-compat": "3.17.0", 21 | "react-i18next": "6.0.6", 22 | "react-redux": "5.0.6", 23 | "react-router-dom": "4.2.2", 24 | "redux": "3.7.2", 25 | "redux-form": "7.1.1", 26 | "tslib": "1.8.0", 27 | "i18next": "10.0.3", 28 | "i18next-browser-languagedetector": "2.0.0", 29 | "i18next-xhr-backend": "1.4.3" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/App.tsx: -------------------------------------------------------------------------------- 1 | import { Greet } from './Greet' 2 | import { Dispatch } from 'redux' 3 | import { h, Component } from 'preact' 4 | import { Provider } from 'react-redux' 5 | import { BrowserRouter as Router } from 'react-router-dom' 6 | import { translate, Trans, InjectedI18nProps } from 'react-i18next' 7 | 8 | import './typed-children' 9 | import RouterExample from './routes' 10 | import { EnhancedContainer, Container } from './Container' 11 | import { ConfigProvider } from './providers' 12 | import { createStoreFactory } from '../store.config' 13 | import { createI18nConfig } from '../i18n.config' 14 | 15 | const injector = { 16 | baseUrl: 'foo.bar:3000', 17 | } 18 | const store = createStoreFactory() 19 | const i18n = createI18nConfig() 20 | 21 | type Props = InjectedI18nProps 22 | 23 | export class App extends Component { 24 | private changeLanguage = (lng: string) => { 25 | this.props.i18n.changeLanguage(lng) 26 | } 27 | render() { 28 | const { t, i18n } = this.props 29 | 30 | return ( 31 | 32 | 33 | 34 |

35 | 42 |
Hello
43 | 44 | 45 | 46 |
47 | 48 | 49 | 50 | ) 51 | } 52 | } 53 | 54 | const enhance = translate() 55 | 56 | export default enhance(App) 57 | -------------------------------------------------------------------------------- /src/components/Container.tsx: -------------------------------------------------------------------------------- 1 | import { connect, Dispatch } from 'react-redux' 2 | import { h, Component } from 'preact' 3 | 4 | /// 5 | type Store = { 6 | test: { 7 | items: Array 8 | } 9 | } 10 | 11 | type Props = StateProps & DispatchProps & OwnProps 12 | type OwnProps = { 13 | year: number 14 | } 15 | type StateProps = Pick 16 | type DispatchProps = { addItem(payload: string): void } 17 | 18 | const mapStateToProps = ({ test }: Store /* , ownProps: OwnProps */): StateProps => ({ 19 | test, 20 | }) 21 | const mapDispatchToProps = (dispatch: Dispatch): DispatchProps => ({ 22 | addItem(payload: string) { 23 | dispatch({ type: 'ADD_ITEM', payload }) 24 | }, 25 | }) 26 | const enhance = connect(mapStateToProps, mapDispatchToProps) 27 | 28 | export class Container extends Component { 29 | private debug() { 30 | return JSON.stringify(this.props, null, 2) 31 | } 32 | render() { 33 | return
this.debug()
34 | } 35 | } 36 | export const EnhancedContainer = enhance(Container) 37 | 38 | namespace Empty { 39 | interface OwnProps { 40 | foo: string 41 | dispatch: Dispatch 42 | } 43 | 44 | class TestComponent extends Component { 45 | render() { 46 | return null 47 | } 48 | } 49 | 50 | const Test = connect()(TestComponent) 51 | 52 | const verify = 53 | } 54 | -------------------------------------------------------------------------------- /src/components/Greet.tsx: -------------------------------------------------------------------------------- 1 | import { Component, h } from 'preact' 2 | 3 | type Props = { who: string } 4 | export class Greet extends Component { 5 | render() { 6 | return

{this.props.who}

7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/components/forms/FieldLevelValidationForm.tsx: -------------------------------------------------------------------------------- 1 | import { h } from 'preact' 2 | import { Field, reduxForm, WrappedFieldProps, BaseFieldsProps, InjectedFormProps } from 'redux-form' 3 | 4 | import * as validators from './validators' 5 | 6 | type RenderFieldProps = WrappedFieldProps 7 | const renderField = ({ input, label, type, meta: { touched, error, warning } }: RenderFieldProps) => ( 8 |
9 | 10 |
11 | 12 | {touched && ((error && {error}) || (warning && {warning}))} 13 |
14 |
15 | ) 16 | 17 | type Props = InjectedFormProps<{}> 18 | const FieldLevelValidationForm = (props: Props) => { 19 | const { handleSubmit, pristine, reset, submitting } = props 20 | return ( 21 |
22 | 30 | 38 | 46 | 53 |
54 | 57 | 60 |
61 | 62 | ) 63 | } 64 | 65 | const enhance = reduxForm({ 66 | form: 'fieldLevelValidation', // a unique identifier for this form 67 | }) 68 | 69 | export default enhance(FieldLevelValidationForm) 70 | -------------------------------------------------------------------------------- /src/components/forms/SimpleForm.tsx: -------------------------------------------------------------------------------- 1 | import { h } from 'preact' 2 | import { Field, reduxForm, InjectedFormProps } from 'redux-form' 3 | 4 | type Props = InjectedFormProps 5 | 6 | const SimpleForm = (props: Props) => { 7 | const { handleSubmit, pristine, reset, submitting } = props 8 | return ( 9 |
10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 | 18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 | 34 | 37 |
38 |
39 |
40 | 41 |
42 | 43 | 45 | 46 | 47 | 48 |
49 |
50 |
51 | 52 |
53 | 54 |
55 |
56 |
57 | 58 |
59 | 60 |
61 |
62 |
63 | 66 | 69 |
70 |
71 | ) 72 | } 73 | 74 | const enhance = reduxForm({ 75 | form: 'simple', // a unique identifier for this form 76 | }) 77 | 78 | export default enhance(SimpleForm) 79 | -------------------------------------------------------------------------------- /src/components/forms/validators.ts: -------------------------------------------------------------------------------- 1 | export const required = (value: any) => (value ? undefined : 'Required') 2 | export const maxLength = (max: number) => (value: any) => 3 | value && value.length > max ? `Must be ${max} characters or less` : undefined 4 | export const maxLength15 = maxLength(15) 5 | export const minLength = (min: number) => (value: any) => 6 | value && value.length < min ? `Must be ${min} characters or more` : undefined 7 | export const minLength2 = minLength(2) 8 | export const number = (value: any) => (value && isNaN(Number(value)) ? 'Must be a number' : undefined) 9 | export const minValue = (min: number) => (value: any) => (value && value < min ? `Must be at least ${min}` : undefined) 10 | export const minValue18 = minValue(18) 11 | export const email = (value: string) => 12 | value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) ? 'Invalid email address' : undefined 13 | export const tooOld = (value: number) => (value && value > 65 ? 'You might be too old for this' : undefined) 14 | export const aol = (value: string) => 15 | value && /.+@aol\.com/.test(value) ? 'Really? You still use AOL for your email?' : undefined 16 | export const alphaNumeric = (value: string) => 17 | value && /[^a-zA-Z0-9 ]/i.test(value) ? 'Only alphanumeric characters' : undefined 18 | export const phoneNumber = (value: string) => 19 | value && !/^(0|[1-9][0-9]{9})$/i.test(value) ? 'Invalid phone number, must be 10 digits' : undefined 20 | -------------------------------------------------------------------------------- /src/components/providers.tsx: -------------------------------------------------------------------------------- 1 | import { Component, VNode, ChildContextProvider } from 'preact' 2 | import { Children } from 'react' 3 | 4 | type Config = { baseUrl: string } 5 | type Props = { config: Config } 6 | type Context = { config: Config } 7 | export class ConfigProvider extends Component implements ChildContextProvider { 8 | config = this.props.config || {} 9 | 10 | getChildContext(): Context { 11 | return { config: this.config } 12 | } 13 | render() { 14 | const children = Children.only(this.props.children) 15 | 16 | return children 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/components/routes.tsx: -------------------------------------------------------------------------------- 1 | import { h } from 'preact' 2 | import { BrowserRouter as Router, Route, Link, RouteComponentProps, Switch, Redirect } from 'react-router-dom' 3 | 4 | import { Mixed } from '../types' 5 | import { EnhancedContainer } from './Container' 6 | 7 | const Home = () => ( 8 |
9 |

Home

10 |
11 | ) 12 | 13 | const About = () => ( 14 |
15 |

About

16 |
17 | ) 18 | 19 | const Topic = ({ match }: RouteComponentProps<{ topicId: number }>) => ( 20 |
21 |

{match.params.topicId}

22 |
23 | ) 24 | 25 | const Topics = ({ match }: RouteComponentProps) => ( 26 |
27 |

Topics

28 |
    29 |
  • 30 | Rendering with React 31 |
  • 32 |
  • 33 | Components 34 |
  • 35 |
  • 36 | Props v. State 37 |
  • 38 |
39 | 40 | 41 |

Please select a topic.

} /> 42 |
43 | ) 44 | 45 | const RouterExample = () => ( 46 | 47 |
48 |
    49 |
  • 50 | Home 51 |
  • 52 |
  • 53 | About 54 |
  • 55 |
  • 56 | Topics 57 |
  • 58 |
59 | 60 |
61 | 62 | 63 | 64 | 65 | 66 |
67 |
68 | ) 69 | 70 | const NoMatchExample = () => ( 71 | 72 |
73 |
    74 |
  • 75 | Home 76 |
  • 77 |
  • 78 | Old Match, to be redirected 79 |
  • 80 |
  • 81 | Will Match 82 |
  • 83 |
  • 84 | Will Not Match 85 |
  • 86 |
  • 87 | Also Will Not Match 88 |
  • 89 |
90 | 91 | {/* sfdsfds */} 92 | 93 | 94 | 95 | 96 | 97 |
98 |
99 | ) 100 | 101 | const WillMatch = () =>

Matched!

102 | 103 | const NoMatch = ({ location }: RouteComponentProps) => ( 104 |
105 |

106 | No match for {location.pathname} 107 |

108 |
109 | ) 110 | 111 | export default RouterExample 112 | -------------------------------------------------------------------------------- /src/components/typed-children.tsx: -------------------------------------------------------------------------------- 1 | import { h, VNode } from 'preact' 2 | import { Link, Route } from 'react-router-dom' 3 | 4 | namespace OneChildConstraint { 5 | type Props = { 6 | children: JSX.Element 7 | } 8 | 9 | const MyComponent = (props: Props) => { 10 | // implementation... 11 | return
Hello {props.children}
12 | } 13 | 14 | // Not allowed! You must have children. 15 | // const out1 = 16 | 17 | // Not ok! We have multiple element children. 18 | // const out2 = ( 19 | // 20 | //
21 | //
22 | //
23 | // 24 | // ) 25 | 26 | // This is ok. We have a single element child. 27 | const out3 = ( 28 | 29 |
30 | 31 | ) 32 | } 33 | 34 | namespace MulitpleChildrenConstraint { 35 | type Props = { 36 | children: JSX.Element[] 37 | } 38 | 39 | const MyComponent = (props: Props) => { 40 | // implementation... 41 | return
Hello {props.children}
42 | } 43 | 44 | // Not allowed! You must have multiple children. 45 | // const out1 = 46 | 47 | // This is not ok. We have only single element child. 48 | // const out3 = ( 49 | // 50 | //
51 | // 52 | // ) 53 | 54 | // Ok! We have multiple element children. 55 | const out2 = ( 56 | 57 |
58 |
59 |
60 | 61 | ) 62 | } 63 | 64 | namespace PrimitiveChildren { 65 | type Prop = { 66 | a: number 67 | b: string 68 | children: string | JSX.Element 69 | } 70 | 71 | const Comp = (p: Prop) =>
{p.b}
72 | 73 | // Error: missing children 74 | // const k = 75 | 76 | // Error: type not match 77 | // For this to work, "children: Array" 78 | // let k1 = ( 79 | // 80 | //

Hello

"hi" 81 | //
82 | // ) 83 | 84 | // OK 85 | let k1 = ( 86 | 87 |

Hello

88 |
89 | ) 90 | 91 | type Prop2 = { 92 | a: number 93 | b: string 94 | children: Array 95 | } 96 | const Comp2 = (p: Prop2) =>
{p.b}
97 | let k2 = ( 98 | 99 |

Hello

"hi" 100 |
101 | ) 102 | } 103 | 104 | namespace FunctionChildren { 105 | type Props = { 106 | children: (data: { foo: string }) => JSX.Element 107 | } 108 | 109 | const MyComponent = (props: Props) => { 110 | const data = { 111 | foo: 'use type system Luke', 112 | } 113 | // implementation... 114 | return ( 115 |
116 |

Functional children

117 | {props.children(data)} 118 |
119 | ) 120 | } 121 | 122 | const testChildren = {({ foo }) =>
{foo}
}
123 | 124 | const to = '/some/path' 125 | const rest = {} 126 | 127 | const testRoute = ( 128 | 129 | {({ match }) => ( 130 |
  • 131 | 132 |
  • 133 | )} 134 |
    135 | ) 136 | } 137 | -------------------------------------------------------------------------------- /src/i18n.config.ts: -------------------------------------------------------------------------------- 1 | import i18n from 'i18next' 2 | import Backend from 'i18next-xhr-backend' 3 | import LanguageDetector from 'i18next-browser-languagedetector' 4 | import { reactI18nextModule, InjectedTranslateProps } from 'react-i18next' 5 | 6 | export const createI18nConfig = (options: i18n.InitOptions = {}): i18n.i18n => { 7 | return i18n 8 | .use(Backend) 9 | .use(LanguageDetector) 10 | .use(reactI18nextModule) 11 | .init({ 12 | fallbackLng: 'en', 13 | 14 | // have a common namespace used around the full app 15 | ns: ['translations'], 16 | defaultNS: 'translations', 17 | 18 | debug: true, 19 | 20 | interpolation: { 21 | escapeValue: false, // not needed for react!! 22 | }, 23 | 24 | react: { 25 | wait: true, 26 | }, 27 | ...options, 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import { h, render } from 'preact' 2 | 3 | import App from './components/App' 4 | 5 | const mountNode = document.getElementById('app') 6 | 7 | render(, mountNode) 8 | -------------------------------------------------------------------------------- /src/store.config.ts: -------------------------------------------------------------------------------- 1 | import { createStore, Store, Action, combineReducers } from 'redux' 2 | import { StateToReducerMap } from './types' 3 | 4 | const enum ActionTypes { 5 | INCREMENT = 'INCREMENT', 6 | DECREMENT = 'DECREMENT', 7 | } 8 | export class IncrementAction implements Action { 9 | readonly type = ActionTypes.INCREMENT 10 | } 11 | export class DecrementAction implements Action { 12 | readonly type = ActionTypes.DECREMENT 13 | } 14 | type Actions = IncrementAction | DecrementAction 15 | 16 | type State = { 17 | counter: number 18 | } 19 | const initialState = 0 20 | 21 | const counterReducer = (state = initialState, action: Actions) => { 22 | switch (action.type) { 23 | case ActionTypes.INCREMENT: 24 | return state + 1 25 | case ActionTypes.DECREMENT: 26 | return state - 1 27 | default: 28 | return state 29 | } 30 | } 31 | 32 | export const createStoreFactory = (): Store => { 33 | const reducers: StateToReducerMap = { 34 | counter: counterReducer, 35 | } 36 | const rootReducer = combineReducers(reducers) 37 | 38 | return createStore(rootReducer) 39 | } 40 | -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- 1 | import { Reducer } from 'redux' 2 | 3 | export type Mixed = {} 4 | export type Maybe = T | null | undefined 5 | 6 | // Redux types 7 | export type StateToReducerMap = { readonly [P in keyof S]: Reducer } 8 | export type Action = Readonly<{ 9 | type: string 10 | payload?: any 11 | }> 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ 5 | "target": "es5", 6 | /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | "module": "esnext", 8 | // "lib": [], /* Specify library files to be included in the compilation: */ 9 | // "allowJs": true, /* Allow javascript files to be compiled. */ 10 | // "checkJs": true, /* Report errors in .js files. */ 11 | "jsx": "react", 12 | "jsxFactory": "h", 13 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 14 | /* Generates corresponding '.map' file. */ 15 | "sourceMap": true, 16 | /* Redirect output structure to the directory. */ 17 | "outDir": "./ts-out", 18 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 19 | // "removeComments": true, /* Do not emit comments to output. */ 20 | // "noEmit": true, /* Do not emit outputs. */ 21 | /* Import emit helpers from 'tslib'. */ 22 | "importHelpers": true, 23 | /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 24 | "downlevelIteration": true, 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "pretty": true, 29 | "strict": true, 30 | 31 | /* Additional Checks */ 32 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 33 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 34 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 35 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 36 | 37 | /* Module Resolution Options */ 38 | "moduleResolution": "node", 39 | "skipLibCheck": true, 40 | "baseUrl": "./" /* Base directory to resolve non-absolute module names. */, 41 | "paths": { 42 | "preact": ["custom-types/preact"], 43 | // explicitly cast to our installed version of react < 16 44 | "react": ["node_modules/@types/react" /* , "custom-types/react" */], 45 | // explicity override lib/ defs with our custom ones 46 | "redux-form/lib/*": ["custom-types/redux-form/lib/*"] 47 | // "redux-form": ["custom-types/redux-form", "node_modules/@types/redux-form"] 48 | // @NOPE: 49 | // following is overkill: so we just extend Preact with type defs to match structural shape, Structural typing FTW !!! 50 | // "react": ["custom-types/preact-compat"] 51 | }, 52 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 53 | /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 54 | /* List of folders to include type definitions from. */ 55 | "typeRoots": ["custom-types", "node_modules/@types"], 56 | // "types": [], /* Type declaration files to be included in compilation. */ 57 | /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 58 | "allowSyntheticDefaultImports": true, 59 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 60 | 61 | /* Source Map Options */ 62 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 63 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ 64 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 65 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 66 | 67 | /* Experimental Options */ 68 | "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */, 69 | "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */ 70 | }, 71 | "include": ["src"] 72 | } 73 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/history@*": 6 | version "4.6.1" 7 | resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.1.tgz#0dbaef4febad5d074d06dbdfae6b027d1d701d25" 8 | 9 | "@types/i18next-browser-languagedetector@2.0.0": 10 | version "2.0.0" 11 | resolved "https://registry.yarnpkg.com/@types/i18next-browser-languagedetector/-/i18next-browser-languagedetector-2.0.0.tgz#b6c1b87d2de4213414290efd4af1f45ed9fbdb1a" 12 | 13 | "@types/i18next-xhr-backend@1.4.0": 14 | version "1.4.0" 15 | resolved "https://registry.yarnpkg.com/@types/i18next-xhr-backend/-/i18next-xhr-backend-1.4.0.tgz#196742adb5767d8fccb4a1146512c6da8fca9a22" 16 | 17 | "@types/i18next@*": 18 | version "8.4.2" 19 | resolved "https://registry.yarnpkg.com/@types/i18next/-/i18next-8.4.2.tgz#9f809c4a9d3687f7643254cde85b1127db616180" 20 | 21 | "@types/react-i18next@4.6.0": 22 | version "4.6.0" 23 | resolved "https://registry.yarnpkg.com/@types/react-i18next/-/react-i18next-4.6.0.tgz#511b8f7871b81947db27b59b320bc65287f6c920" 24 | dependencies: 25 | "@types/i18next" "*" 26 | "@types/react" "*" 27 | 28 | "@types/react-redux@5.0.10": 29 | version "5.0.10" 30 | resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-5.0.10.tgz#f5c45a349f759d87d6b1f2aa096a756561a6d5c9" 31 | dependencies: 32 | "@types/react" "*" 33 | redux "^3.6.0" 34 | 35 | "@types/react-router-dom@4.0.8": 36 | version "4.0.8" 37 | resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.0.8.tgz#a9731bf35d053cdd27053baacc19e505d74514f3" 38 | dependencies: 39 | "@types/history" "*" 40 | "@types/react" "*" 41 | "@types/react-router" "*" 42 | 43 | "@types/react-router@*": 44 | version "4.0.16" 45 | resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.16.tgz#5153d07cb138a30c50aaaa33c8d654e8f321ae13" 46 | dependencies: 47 | "@types/history" "*" 48 | "@types/react" "*" 49 | 50 | "@types/react@*": 51 | version "16.0.18" 52 | resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.18.tgz#c08eea79ada55bf10b5353e18c21797dd17afa23" 53 | 54 | "@types/react@15.6.5": 55 | version "15.6.5" 56 | resolved "https://registry.yarnpkg.com/@types/react/-/react-15.6.5.tgz#fb23b8d8b7226313b645b6e84fb178976bbfe587" 57 | 58 | "@types/redux-form@7.0.6": 59 | version "7.0.6" 60 | resolved "https://registry.yarnpkg.com/@types/redux-form/-/redux-form-7.0.6.tgz#81cbb6bd092f3d800ec25ced014bc260bad02456" 61 | dependencies: 62 | "@types/react" "*" 63 | redux "^3.6.0" 64 | 65 | ansi-regex@^2.0.0: 66 | version "2.1.1" 67 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 68 | 69 | ansi-styles@^2.2.1: 70 | version "2.2.1" 71 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 72 | 73 | arr-diff@^2.0.0: 74 | version "2.0.0" 75 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 76 | dependencies: 77 | arr-flatten "^1.0.1" 78 | 79 | arr-flatten@^1.0.1: 80 | version "1.1.0" 81 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" 82 | 83 | array-unique@^0.2.1: 84 | version "0.2.1" 85 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 86 | 87 | arrify@^1.0.1: 88 | version "1.0.1" 89 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 90 | 91 | asap@~2.0.3: 92 | version "2.0.6" 93 | resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" 94 | 95 | babel-code-frame@^6.26.0: 96 | version "6.26.0" 97 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" 98 | dependencies: 99 | chalk "^1.1.3" 100 | esutils "^2.0.2" 101 | js-tokens "^3.0.2" 102 | 103 | babel-generator@^6.18.0: 104 | version "6.26.0" 105 | resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" 106 | dependencies: 107 | babel-messages "^6.23.0" 108 | babel-runtime "^6.26.0" 109 | babel-types "^6.26.0" 110 | detect-indent "^4.0.0" 111 | jsesc "^1.3.0" 112 | lodash "^4.17.4" 113 | source-map "^0.5.6" 114 | trim-right "^1.0.1" 115 | 116 | babel-jest@^21.2.0: 117 | version "21.2.0" 118 | resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-21.2.0.tgz#2ce059519a9374a2c46f2455b6fbef5ad75d863e" 119 | dependencies: 120 | babel-plugin-istanbul "^4.0.0" 121 | babel-preset-jest "^21.2.0" 122 | 123 | babel-messages@^6.23.0: 124 | version "6.23.0" 125 | resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" 126 | dependencies: 127 | babel-runtime "^6.22.0" 128 | 129 | babel-plugin-istanbul@^4.0.0: 130 | version "4.1.5" 131 | resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" 132 | dependencies: 133 | find-up "^2.1.0" 134 | istanbul-lib-instrument "^1.7.5" 135 | test-exclude "^4.1.1" 136 | 137 | babel-plugin-jest-hoist@^21.2.0: 138 | version "21.2.0" 139 | resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-21.2.0.tgz#2cef637259bd4b628a6cace039de5fcd14dbb006" 140 | 141 | babel-plugin-syntax-object-rest-spread@^6.13.0: 142 | version "6.13.0" 143 | resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" 144 | 145 | babel-preset-jest@^21.2.0: 146 | version "21.2.0" 147 | resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-21.2.0.tgz#ff9d2bce08abd98e8a36d9a8a5189b9173b85638" 148 | dependencies: 149 | babel-plugin-jest-hoist "^21.2.0" 150 | babel-plugin-syntax-object-rest-spread "^6.13.0" 151 | 152 | babel-runtime@^6.22.0, babel-runtime@^6.26.0: 153 | version "6.26.0" 154 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" 155 | dependencies: 156 | core-js "^2.4.0" 157 | regenerator-runtime "^0.11.0" 158 | 159 | babel-template@^6.16.0: 160 | version "6.26.0" 161 | resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" 162 | dependencies: 163 | babel-runtime "^6.26.0" 164 | babel-traverse "^6.26.0" 165 | babel-types "^6.26.0" 166 | babylon "^6.18.0" 167 | lodash "^4.17.4" 168 | 169 | babel-traverse@^6.18.0, babel-traverse@^6.26.0: 170 | version "6.26.0" 171 | resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" 172 | dependencies: 173 | babel-code-frame "^6.26.0" 174 | babel-messages "^6.23.0" 175 | babel-runtime "^6.26.0" 176 | babel-types "^6.26.0" 177 | babylon "^6.18.0" 178 | debug "^2.6.8" 179 | globals "^9.18.0" 180 | invariant "^2.2.2" 181 | lodash "^4.17.4" 182 | 183 | babel-types@^6.18.0, babel-types@^6.26.0: 184 | version "6.26.0" 185 | resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" 186 | dependencies: 187 | babel-runtime "^6.26.0" 188 | esutils "^2.0.2" 189 | lodash "^4.17.4" 190 | to-fast-properties "^1.0.3" 191 | 192 | babylon@^6.18.0: 193 | version "6.18.0" 194 | resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" 195 | 196 | braces@^1.8.2: 197 | version "1.8.5" 198 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 199 | dependencies: 200 | expand-range "^1.8.1" 201 | preserve "^0.2.0" 202 | repeat-element "^1.1.2" 203 | 204 | builtin-modules@^1.0.0: 205 | version "1.1.1" 206 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 207 | 208 | chalk@^1.1.3: 209 | version "1.1.3" 210 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 211 | dependencies: 212 | ansi-styles "^2.2.1" 213 | escape-string-regexp "^1.0.2" 214 | has-ansi "^2.0.0" 215 | strip-ansi "^3.0.0" 216 | supports-color "^2.0.0" 217 | 218 | core-js@^1.0.0: 219 | version "1.2.7" 220 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" 221 | 222 | core-js@^2.4.0: 223 | version "2.5.1" 224 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" 225 | 226 | debug@^2.6.8: 227 | version "2.6.9" 228 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 229 | dependencies: 230 | ms "2.0.0" 231 | 232 | deep-equal@^1.0.1: 233 | version "1.0.1" 234 | resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" 235 | 236 | detect-indent@^4.0.0: 237 | version "4.0.0" 238 | resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" 239 | dependencies: 240 | repeating "^2.0.0" 241 | 242 | encoding@^0.1.11: 243 | version "0.1.12" 244 | resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" 245 | dependencies: 246 | iconv-lite "~0.4.13" 247 | 248 | error-ex@^1.2.0: 249 | version "1.3.1" 250 | resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 251 | dependencies: 252 | is-arrayish "^0.2.1" 253 | 254 | es6-error@^4.0.0: 255 | version "4.0.2" 256 | resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98" 257 | 258 | escape-string-regexp@^1.0.2: 259 | version "1.0.5" 260 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 261 | 262 | esutils@^2.0.2: 263 | version "2.0.2" 264 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 265 | 266 | expand-brackets@^0.1.4: 267 | version "0.1.5" 268 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 269 | dependencies: 270 | is-posix-bracket "^0.1.0" 271 | 272 | expand-range@^1.8.1: 273 | version "1.8.2" 274 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 275 | dependencies: 276 | fill-range "^2.1.0" 277 | 278 | extglob@^0.3.1: 279 | version "0.3.2" 280 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 281 | dependencies: 282 | is-extglob "^1.0.0" 283 | 284 | fbjs@^0.8.16: 285 | version "0.8.16" 286 | resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" 287 | dependencies: 288 | core-js "^1.0.0" 289 | isomorphic-fetch "^2.1.1" 290 | loose-envify "^1.0.0" 291 | object-assign "^4.1.0" 292 | promise "^7.1.1" 293 | setimmediate "^1.0.5" 294 | ua-parser-js "^0.7.9" 295 | 296 | filename-regex@^2.0.0: 297 | version "2.0.1" 298 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" 299 | 300 | fill-range@^2.1.0: 301 | version "2.2.3" 302 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" 303 | dependencies: 304 | is-number "^2.1.0" 305 | isobject "^2.0.0" 306 | randomatic "^1.1.3" 307 | repeat-element "^1.1.2" 308 | repeat-string "^1.5.2" 309 | 310 | find-up@^1.0.0: 311 | version "1.1.2" 312 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 313 | dependencies: 314 | path-exists "^2.0.0" 315 | pinkie-promise "^2.0.0" 316 | 317 | find-up@^2.1.0: 318 | version "2.1.0" 319 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 320 | dependencies: 321 | locate-path "^2.0.0" 322 | 323 | for-in@^1.0.1: 324 | version "1.0.2" 325 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" 326 | 327 | for-own@^0.1.4: 328 | version "0.1.5" 329 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 330 | dependencies: 331 | for-in "^1.0.1" 332 | 333 | glob-base@^0.3.0: 334 | version "0.3.0" 335 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 336 | dependencies: 337 | glob-parent "^2.0.0" 338 | is-glob "^2.0.0" 339 | 340 | glob-parent@^2.0.0: 341 | version "2.0.0" 342 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 343 | dependencies: 344 | is-glob "^2.0.0" 345 | 346 | globals@^9.18.0: 347 | version "9.18.0" 348 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" 349 | 350 | graceful-fs@^4.1.2: 351 | version "4.1.11" 352 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 353 | 354 | has-ansi@^2.0.0: 355 | version "2.0.0" 356 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 357 | dependencies: 358 | ansi-regex "^2.0.0" 359 | 360 | history@^4.7.2: 361 | version "4.7.2" 362 | resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b" 363 | dependencies: 364 | invariant "^2.2.1" 365 | loose-envify "^1.2.0" 366 | resolve-pathname "^2.2.0" 367 | value-equal "^0.4.0" 368 | warning "^3.0.0" 369 | 370 | hoist-non-react-statics@2.3.1, hoist-non-react-statics@^2.2.1, hoist-non-react-statics@^2.3.0, hoist-non-react-statics@^2.3.1: 371 | version "2.3.1" 372 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" 373 | 374 | hosted-git-info@^2.1.4: 375 | version "2.5.0" 376 | resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" 377 | 378 | html-parse-stringify2@2.0.1: 379 | version "2.0.1" 380 | resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a" 381 | dependencies: 382 | void-elements "^2.0.1" 383 | 384 | i18next-browser-languagedetector@2.0.0: 385 | version "2.0.0" 386 | resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-2.0.0.tgz#4d9df2bd1a5deda3c8c0a6d3db62d50388b9eedd" 387 | 388 | i18next-xhr-backend@1.4.3: 389 | version "1.4.3" 390 | resolved "https://registry.yarnpkg.com/i18next-xhr-backend/-/i18next-xhr-backend-1.4.3.tgz#d72f70536a3bf6a3892261dde352bc77d708886a" 391 | 392 | i18next@10.0.3: 393 | version "10.0.3" 394 | resolved "https://registry.yarnpkg.com/i18next/-/i18next-10.0.3.tgz#f81553d27b4137e98979a0c62698894cff6b3667" 395 | 396 | iconv-lite@~0.4.13: 397 | version "0.4.19" 398 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" 399 | 400 | immutability-helper@^2.1.2: 401 | version "2.4.0" 402 | resolved "https://registry.yarnpkg.com/immutability-helper/-/immutability-helper-2.4.0.tgz#00d421e2957c17f0f0781475f05ffd837e73458d" 403 | dependencies: 404 | invariant "^2.2.0" 405 | 406 | invariant@^2.0.0, invariant@^2.2.0, invariant@^2.2.1, invariant@^2.2.2: 407 | version "2.2.2" 408 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" 409 | dependencies: 410 | loose-envify "^1.0.0" 411 | 412 | is-arrayish@^0.2.1: 413 | version "0.2.1" 414 | resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 415 | 416 | is-buffer@^1.1.5: 417 | version "1.1.5" 418 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" 419 | 420 | is-builtin-module@^1.0.0: 421 | version "1.0.0" 422 | resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 423 | dependencies: 424 | builtin-modules "^1.0.0" 425 | 426 | is-dotfile@^1.0.0: 427 | version "1.0.3" 428 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" 429 | 430 | is-equal-shallow@^0.1.3: 431 | version "0.1.3" 432 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 433 | dependencies: 434 | is-primitive "^2.0.0" 435 | 436 | is-extendable@^0.1.1: 437 | version "0.1.1" 438 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 439 | 440 | is-extglob@^1.0.0: 441 | version "1.0.0" 442 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 443 | 444 | is-finite@^1.0.0: 445 | version "1.0.2" 446 | resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" 447 | dependencies: 448 | number-is-nan "^1.0.0" 449 | 450 | is-glob@^2.0.0, is-glob@^2.0.1: 451 | version "2.0.1" 452 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 453 | dependencies: 454 | is-extglob "^1.0.0" 455 | 456 | is-number@^2.1.0: 457 | version "2.1.0" 458 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 459 | dependencies: 460 | kind-of "^3.0.2" 461 | 462 | is-number@^3.0.0: 463 | version "3.0.0" 464 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" 465 | dependencies: 466 | kind-of "^3.0.2" 467 | 468 | is-posix-bracket@^0.1.0: 469 | version "0.1.1" 470 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 471 | 472 | is-primitive@^2.0.0: 473 | version "2.0.0" 474 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 475 | 476 | is-promise@^2.1.0: 477 | version "2.1.0" 478 | resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 479 | 480 | is-stream@^1.0.1: 481 | version "1.1.0" 482 | resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 483 | 484 | is-utf8@^0.2.0: 485 | version "0.2.1" 486 | resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" 487 | 488 | isarray@0.0.1: 489 | version "0.0.1" 490 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" 491 | 492 | isarray@1.0.0: 493 | version "1.0.0" 494 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 495 | 496 | isobject@^2.0.0: 497 | version "2.1.0" 498 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 499 | dependencies: 500 | isarray "1.0.0" 501 | 502 | isomorphic-fetch@^2.1.1: 503 | version "2.2.1" 504 | resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" 505 | dependencies: 506 | node-fetch "^1.0.1" 507 | whatwg-fetch ">=0.10.0" 508 | 509 | istanbul-lib-coverage@^1.1.1: 510 | version "1.1.1" 511 | resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" 512 | 513 | istanbul-lib-instrument@^1.7.5: 514 | version "1.9.1" 515 | resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" 516 | dependencies: 517 | babel-generator "^6.18.0" 518 | babel-template "^6.16.0" 519 | babel-traverse "^6.18.0" 520 | babel-types "^6.18.0" 521 | babylon "^6.18.0" 522 | istanbul-lib-coverage "^1.1.1" 523 | semver "^5.3.0" 524 | 525 | js-tokens@^3.0.0, js-tokens@^3.0.2: 526 | version "3.0.2" 527 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 528 | 529 | jsesc@^1.3.0: 530 | version "1.3.0" 531 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" 532 | 533 | kind-of@^3.0.2: 534 | version "3.2.2" 535 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" 536 | dependencies: 537 | is-buffer "^1.1.5" 538 | 539 | kind-of@^4.0.0: 540 | version "4.0.0" 541 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" 542 | dependencies: 543 | is-buffer "^1.1.5" 544 | 545 | load-json-file@^1.0.0: 546 | version "1.1.0" 547 | resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" 548 | dependencies: 549 | graceful-fs "^4.1.2" 550 | parse-json "^2.2.0" 551 | pify "^2.0.0" 552 | pinkie-promise "^2.0.0" 553 | strip-bom "^2.0.0" 554 | 555 | locate-path@^2.0.0: 556 | version "2.0.0" 557 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 558 | dependencies: 559 | p-locate "^2.0.0" 560 | path-exists "^3.0.0" 561 | 562 | lodash-es@^4.17.3, lodash-es@^4.2.0, lodash-es@^4.2.1: 563 | version "4.17.4" 564 | resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" 565 | 566 | lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1: 567 | version "4.17.4" 568 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 569 | 570 | loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1: 571 | version "1.3.1" 572 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" 573 | dependencies: 574 | js-tokens "^3.0.0" 575 | 576 | micromatch@^2.3.11: 577 | version "2.3.11" 578 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 579 | dependencies: 580 | arr-diff "^2.0.0" 581 | array-unique "^0.2.1" 582 | braces "^1.8.2" 583 | expand-brackets "^0.1.4" 584 | extglob "^0.3.1" 585 | filename-regex "^2.0.0" 586 | is-extglob "^1.0.0" 587 | is-glob "^2.0.1" 588 | kind-of "^3.0.2" 589 | normalize-path "^2.0.1" 590 | object.omit "^2.0.0" 591 | parse-glob "^3.0.4" 592 | regex-cache "^0.4.2" 593 | 594 | ms@2.0.0: 595 | version "2.0.0" 596 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 597 | 598 | node-fetch@^1.0.1: 599 | version "1.7.3" 600 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" 601 | dependencies: 602 | encoding "^0.1.11" 603 | is-stream "^1.0.1" 604 | 605 | normalize-package-data@^2.3.2: 606 | version "2.4.0" 607 | resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 608 | dependencies: 609 | hosted-git-info "^2.1.4" 610 | is-builtin-module "^1.0.0" 611 | semver "2 || 3 || 4 || 5" 612 | validate-npm-package-license "^3.0.1" 613 | 614 | normalize-path@^2.0.1: 615 | version "2.1.1" 616 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" 617 | dependencies: 618 | remove-trailing-separator "^1.0.1" 619 | 620 | number-is-nan@^1.0.0: 621 | version "1.0.1" 622 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 623 | 624 | object-assign@^4.1.0, object-assign@^4.1.1: 625 | version "4.1.1" 626 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 627 | 628 | object.omit@^2.0.0: 629 | version "2.0.1" 630 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 631 | dependencies: 632 | for-own "^0.1.4" 633 | is-extendable "^0.1.1" 634 | 635 | p-limit@^1.1.0: 636 | version "1.1.0" 637 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" 638 | 639 | p-locate@^2.0.0: 640 | version "2.0.0" 641 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 642 | dependencies: 643 | p-limit "^1.1.0" 644 | 645 | parse-glob@^3.0.4: 646 | version "3.0.4" 647 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 648 | dependencies: 649 | glob-base "^0.3.0" 650 | is-dotfile "^1.0.0" 651 | is-extglob "^1.0.0" 652 | is-glob "^2.0.0" 653 | 654 | parse-json@^2.2.0: 655 | version "2.2.0" 656 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 657 | dependencies: 658 | error-ex "^1.2.0" 659 | 660 | path-exists@^2.0.0: 661 | version "2.1.0" 662 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 663 | dependencies: 664 | pinkie-promise "^2.0.0" 665 | 666 | path-exists@^3.0.0: 667 | version "3.0.0" 668 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 669 | 670 | path-to-regexp@^1.7.0: 671 | version "1.7.0" 672 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" 673 | dependencies: 674 | isarray "0.0.1" 675 | 676 | path-type@^1.0.0: 677 | version "1.1.0" 678 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" 679 | dependencies: 680 | graceful-fs "^4.1.2" 681 | pify "^2.0.0" 682 | pinkie-promise "^2.0.0" 683 | 684 | pify@^2.0.0: 685 | version "2.3.0" 686 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 687 | 688 | pinkie-promise@^2.0.0: 689 | version "2.0.1" 690 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 691 | dependencies: 692 | pinkie "^2.0.0" 693 | 694 | pinkie@^2.0.0: 695 | version "2.0.4" 696 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 697 | 698 | preact-compat@3.17.0: 699 | version "3.17.0" 700 | resolved "https://registry.yarnpkg.com/preact-compat/-/preact-compat-3.17.0.tgz#528cfdfc301190c1a0f47567336be1f4be0266b3" 701 | dependencies: 702 | immutability-helper "^2.1.2" 703 | preact-render-to-string "^3.6.0" 704 | preact-transition-group "^1.1.0" 705 | prop-types "^15.5.8" 706 | standalone-react-addons-pure-render-mixin "^0.1.1" 707 | 708 | preact-render-to-string@^3.6.0: 709 | version "3.7.0" 710 | resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-3.7.0.tgz#7db4177454bc01395e0d01d6ac07bc5e838e31ee" 711 | dependencies: 712 | pretty-format "^3.5.1" 713 | 714 | preact-transition-group@^1.1.0: 715 | version "1.1.1" 716 | resolved "https://registry.yarnpkg.com/preact-transition-group/-/preact-transition-group-1.1.1.tgz#f0a49327ea515ece34ea2be864c4a7d29e5d6e10" 717 | 718 | preact@8.2.5: 719 | version "8.2.5" 720 | resolved "https://registry.yarnpkg.com/preact/-/preact-8.2.5.tgz#cbfa3962a8012768159f6d01d46f9c1eb3213c0a" 721 | 722 | preserve@^0.2.0: 723 | version "0.2.0" 724 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 725 | 726 | pretty-format@^3.5.1: 727 | version "3.8.0" 728 | resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" 729 | 730 | promise@^7.1.1: 731 | version "7.3.1" 732 | resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" 733 | dependencies: 734 | asap "~2.0.3" 735 | 736 | prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.8, prop-types@^15.5.9: 737 | version "15.6.0" 738 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" 739 | dependencies: 740 | fbjs "^0.8.16" 741 | loose-envify "^1.3.1" 742 | object-assign "^4.1.1" 743 | 744 | randomatic@^1.1.3: 745 | version "1.1.7" 746 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" 747 | dependencies: 748 | is-number "^3.0.0" 749 | kind-of "^4.0.0" 750 | 751 | react-i18next@6.0.6: 752 | version "6.0.6" 753 | resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-6.0.6.tgz#be92e3936c98c2934019457484cb85b9c2be1c28" 754 | dependencies: 755 | hoist-non-react-statics "2.3.1" 756 | html-parse-stringify2 "2.0.1" 757 | 758 | react-redux@5.0.6: 759 | version "5.0.6" 760 | resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946" 761 | dependencies: 762 | hoist-non-react-statics "^2.2.1" 763 | invariant "^2.0.0" 764 | lodash "^4.2.0" 765 | lodash-es "^4.2.0" 766 | loose-envify "^1.1.0" 767 | prop-types "^15.5.10" 768 | 769 | react-router-dom@4.2.2: 770 | version "4.2.2" 771 | resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.2.2.tgz#c8a81df3adc58bba8a76782e946cbd4eae649b8d" 772 | dependencies: 773 | history "^4.7.2" 774 | invariant "^2.2.2" 775 | loose-envify "^1.3.1" 776 | prop-types "^15.5.4" 777 | react-router "^4.2.0" 778 | warning "^3.0.0" 779 | 780 | react-router@^4.2.0: 781 | version "4.2.0" 782 | resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986" 783 | dependencies: 784 | history "^4.7.2" 785 | hoist-non-react-statics "^2.3.0" 786 | invariant "^2.2.2" 787 | loose-envify "^1.3.1" 788 | path-to-regexp "^1.7.0" 789 | prop-types "^15.5.4" 790 | warning "^3.0.0" 791 | 792 | read-pkg-up@^1.0.1: 793 | version "1.0.1" 794 | resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" 795 | dependencies: 796 | find-up "^1.0.0" 797 | read-pkg "^1.0.0" 798 | 799 | read-pkg@^1.0.0: 800 | version "1.1.0" 801 | resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" 802 | dependencies: 803 | load-json-file "^1.0.0" 804 | normalize-package-data "^2.3.2" 805 | path-type "^1.0.0" 806 | 807 | redux-form@7.1.1: 808 | version "7.1.1" 809 | resolved "https://registry.yarnpkg.com/redux-form/-/redux-form-7.1.1.tgz#4d9ab1d9c03beb3a8b5f8e5d0f398cff4209081f" 810 | dependencies: 811 | babel-jest "^21.2.0" 812 | deep-equal "^1.0.1" 813 | es6-error "^4.0.0" 814 | hoist-non-react-statics "^2.3.1" 815 | invariant "^2.2.2" 816 | is-promise "^2.1.0" 817 | lodash "^4.17.3" 818 | lodash-es "^4.17.3" 819 | prop-types "^15.5.9" 820 | 821 | redux@3.7.2, redux@^3.6.0: 822 | version "3.7.2" 823 | resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b" 824 | dependencies: 825 | lodash "^4.2.1" 826 | lodash-es "^4.2.1" 827 | loose-envify "^1.1.0" 828 | symbol-observable "^1.0.3" 829 | 830 | regenerator-runtime@^0.11.0: 831 | version "0.11.0" 832 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" 833 | 834 | regex-cache@^0.4.2: 835 | version "0.4.4" 836 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" 837 | dependencies: 838 | is-equal-shallow "^0.1.3" 839 | 840 | remove-trailing-separator@^1.0.1: 841 | version "1.1.0" 842 | resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" 843 | 844 | repeat-element@^1.1.2: 845 | version "1.1.2" 846 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" 847 | 848 | repeat-string@^1.5.2: 849 | version "1.6.1" 850 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 851 | 852 | repeating@^2.0.0: 853 | version "2.0.1" 854 | resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" 855 | dependencies: 856 | is-finite "^1.0.0" 857 | 858 | require-main-filename@^1.0.1: 859 | version "1.0.1" 860 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" 861 | 862 | resolve-pathname@^2.2.0: 863 | version "2.2.0" 864 | resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" 865 | 866 | "semver@2 || 3 || 4 || 5", semver@^5.3.0: 867 | version "5.4.1" 868 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" 869 | 870 | setimmediate@^1.0.5: 871 | version "1.0.5" 872 | resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" 873 | 874 | source-map@^0.5.6: 875 | version "0.5.7" 876 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 877 | 878 | spdx-correct@~1.0.0: 879 | version "1.0.2" 880 | resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" 881 | dependencies: 882 | spdx-license-ids "^1.0.2" 883 | 884 | spdx-expression-parse@~1.0.0: 885 | version "1.0.4" 886 | resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" 887 | 888 | spdx-license-ids@^1.0.2: 889 | version "1.2.2" 890 | resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" 891 | 892 | standalone-react-addons-pure-render-mixin@^0.1.1: 893 | version "0.1.1" 894 | resolved "https://registry.yarnpkg.com/standalone-react-addons-pure-render-mixin/-/standalone-react-addons-pure-render-mixin-0.1.1.tgz#3c7409f4c79c40de9ac72c616cf679a994f37551" 895 | 896 | strip-ansi@^3.0.0: 897 | version "3.0.1" 898 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 899 | dependencies: 900 | ansi-regex "^2.0.0" 901 | 902 | strip-bom@^2.0.0: 903 | version "2.0.0" 904 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" 905 | dependencies: 906 | is-utf8 "^0.2.0" 907 | 908 | supports-color@^2.0.0: 909 | version "2.0.0" 910 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 911 | 912 | symbol-observable@^1.0.3: 913 | version "1.0.4" 914 | resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" 915 | 916 | test-exclude@^4.1.1: 917 | version "4.1.1" 918 | resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" 919 | dependencies: 920 | arrify "^1.0.1" 921 | micromatch "^2.3.11" 922 | object-assign "^4.1.0" 923 | read-pkg-up "^1.0.1" 924 | require-main-filename "^1.0.1" 925 | 926 | to-fast-properties@^1.0.3: 927 | version "1.0.3" 928 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" 929 | 930 | trim-right@^1.0.1: 931 | version "1.0.1" 932 | resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" 933 | 934 | tslib@1.8.0: 935 | version "1.8.0" 936 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" 937 | 938 | typescript@2.5.3: 939 | version "2.5.3" 940 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.3.tgz#df3dcdc38f3beb800d4bc322646b04a3f6ca7f0d" 941 | 942 | ua-parser-js@^0.7.9: 943 | version "0.7.17" 944 | resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" 945 | 946 | validate-npm-package-license@^3.0.1: 947 | version "3.0.1" 948 | resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" 949 | dependencies: 950 | spdx-correct "~1.0.0" 951 | spdx-expression-parse "~1.0.0" 952 | 953 | value-equal@^0.4.0: 954 | version "0.4.0" 955 | resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" 956 | 957 | void-elements@^2.0.1: 958 | version "2.0.1" 959 | resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" 960 | 961 | warning@^3.0.0: 962 | version "3.0.0" 963 | resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c" 964 | dependencies: 965 | loose-envify "^1.0.0" 966 | 967 | whatwg-fetch@>=0.10.0: 968 | version "2.0.3" 969 | resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" 970 | --------------------------------------------------------------------------------