user.tsx 414 B

123456789101112131415161718192021222324252627
  1. import User from '../components/user/user'
  2. interface Gogo {
  3. g: string
  4. h: number
  5. }
  6. let gg: Gogo = { g: 'hello', h: 45 }
  7. function letsGogo(anyGogo?: Gogo): void {
  8. console.log(anyGogo)
  9. return
  10. }
  11. letsGogo(gg)
  12. letsGogo({ g: '12', h: 12 })
  13. const myObj = { className: 'bongers' }
  14. const UserPage = (props?: Gogo) => (
  15. <>
  16. <h1 {...myObj}>TypeScript User</h1>
  17. <User />
  18. </>
  19. )
  20. export default UserPage