Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. /// <reference types="react-final-form" />
  2. //// <reference types="./node_modules/react-final-form/dist/index.d.ts" />
  3. //// <reference path="./node_modules/react-final-form/dist/index.d.ts" />
  4. //// <amd-dependency path="./node_modules/react-final-form/dist/index.d.ts" />
  5. // importing resolves the types, but also turns it into a module, which in turn breaks it
  6. // import * as RFF from react-final-form;
  7. // import { FieldProps } from react-final-form;
  8. // export * from react-final-form;
  9.  
  10. declare module 'react-final-form-html5-validation' {
  11. var Field: React.ComponentType<FieldProps>
  12. }
  13.  
  14. import { Field, Abc } from 'react-final-form-html5-validation'
  15. // correct: Module '"react-final-form-html5-validation"' has no exported member 'Abc'
  16.  
  17. // later in App.render() { return ( .....
  18. <Field />
  19.  
  20. // Field is of type React.ComponentType<any>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement