Skip to content
Permalink
Browse files

Migrate GiftedChat to TypeScript (#1190)

πŸŽ‰ TypeScript πŸŽ‰
  • Loading branch information...
xcarpentier committed Apr 30, 2019
1 parent af0c6b8 commit f2476298b983610e1af80d96c3d24328bb926f9d
Showing with 7,356 additions and 7,387 deletions.
  1. +0 βˆ’3 .babelrc
  2. +55 βˆ’0 .circleci/config.yml
  3. +0 βˆ’22 .eslintrc
  4. +1 βˆ’0 .gitignore
  5. +11 βˆ’0 .prettierrc
  6. +0 βˆ’10 .travis.yml
  7. +9 βˆ’0 babel.config.js
  8. +0 βˆ’35 circle.yml
  9. +91 βˆ’79 example-expo/App.js
  10. +1 βˆ’16 example-expo/package.json
  11. +49 βˆ’235 example-expo/yarn.lock
  12. +0 βˆ’397 index.d.ts
  13. +42 βˆ’25 package.json
  14. +0 βˆ’103 src/Actions.js
  15. +110 βˆ’0 src/Actions.tsx
  16. +0 βˆ’129 src/Avatar.js
  17. +175 βˆ’0 src/Avatar.tsx
  18. +0 βˆ’332 src/Bubble.js
  19. +428 βˆ’0 src/Bubble.tsx
  20. +1 βˆ’1 src/{Color.js β†’ Color.ts}
  21. +0 βˆ’100 src/Composer.js
  22. +119 βˆ’0 src/Composer.tsx
  23. 0 src/{Constant.js β†’ Constant.ts}
  24. +61 βˆ’32 src/{Day.js β†’ Day.tsx}
  25. +0 βˆ’130 src/GiftedAvatar.js
  26. +189 βˆ’0 src/GiftedAvatar.tsx
  27. +0 βˆ’648 src/GiftedChat.js
  28. +796 βˆ’0 src/GiftedChat.tsx
  29. +0 βˆ’19 src/GiftedChatInteractionManager.js
  30. +0 βˆ’137 src/InputToolbar.js
  31. +173 βˆ’0 src/InputToolbar.tsx
  32. +77 βˆ’67 src/{LoadEarlier.js β†’ LoadEarlier.tsx}
  33. +0 βˆ’161 src/Message.js
  34. +176 βˆ’0 src/Message.tsx
  35. +0 βˆ’253 src/MessageContainer.js
  36. +333 βˆ’0 src/MessageContainer.tsx
  37. +0 βˆ’64 src/MessageImage.js
  38. +83 βˆ’0 src/MessageImage.tsx
  39. +0 βˆ’163 src/MessageText.js
  40. +186 βˆ’0 src/MessageText.tsx
  41. +0 βˆ’51 src/MessageVideo.js
  42. +67 βˆ’0 src/MessageVideo.tsx
  43. +0 βˆ’65 src/Send.js
  44. +95 βˆ’0 src/Send.tsx
  45. +0 βˆ’48 src/SystemMessage.js
  46. +69 βˆ’0 src/SystemMessage.tsx
  47. +0 βˆ’91 src/Time.js
  48. +126 βˆ’0 src/Time.tsx
  49. +0 βˆ’11 src/__tests__/Actions.test.js
  50. +10 βˆ’0 src/__tests__/Actions.test.tsx
  51. +0 βˆ’11 src/__tests__/Avatar.test.js
  52. +13 βˆ’0 src/__tests__/Avatar.test.tsx
  53. +0 βˆ’13 src/__tests__/Bubble.test.js
  54. +21 βˆ’0 src/__tests__/Bubble.test.tsx
  55. +0 βˆ’5 src/__tests__/Color.test.js
  56. +5 βˆ’0 src/__tests__/Color.test.tsx
  57. 0 src/__tests__/{Composer.test.js β†’ Composer.test.tsx}
  58. 0 src/__tests__/{Constant.test.js β†’ Constant.test.tsx}
  59. +0 βˆ’12 src/__tests__/Day.test.js
  60. +12 βˆ’0 src/__tests__/Day.test.tsx
  61. 0 src/__tests__/{GiftedAvatar.test.js β†’ GiftedAvatar.test.tsx}
  62. 0 src/__tests__/{GiftedChat.test.js β†’ GiftedChat.test.tsx}
  63. 0 src/__tests__/{InputToolbar.test.js β†’ InputToolbar.test.tsx}
  64. 0 src/__tests__/{LoadEarlier.test.js β†’ LoadEarlier.test.tsx}
  65. +0 βˆ’13 src/__tests__/Message.test.js
  66. +22 βˆ’0 src/__tests__/Message.test.tsx
  67. 0 src/__tests__/{MessageContainer.test.js β†’ MessageContainer.test.tsx}
  68. 0 src/__tests__/{MessageImage.test.js β†’ MessageImage.test.tsx}
  69. 0 src/__tests__/{MessageText.test.js β†’ MessageText.test.tsx}
  70. 0 src/__tests__/{Send.test.js β†’ Send.test.tsx}
  71. 0 src/__tests__/{SystemMessage.test.js β†’ SystemMessage.test.tsx}
  72. +0 βˆ’12 src/__tests__/Time.test.js
  73. +12 βˆ’0 src/__tests__/Time.test.tsx
  74. +0 βˆ’13 src/__tests__/__snapshots__/{Actions.test.js.snap β†’ Actions.test.tsx.snap}
  75. 0 src/__tests__/__snapshots__/{Avatar.test.js.snap β†’ Avatar.test.tsx.snap}
  76. +0 βˆ’62 src/__tests__/__snapshots__/Bubble.test.js.snap
  77. +152 βˆ’0 src/__tests__/__snapshots__/Bubble.test.tsx.snap
  78. 0 src/__tests__/__snapshots__/{Color.test.js.snap β†’ Color.test.tsx.snap}
  79. +1 βˆ’1 src/__tests__/__snapshots__/{Composer.test.js.snap β†’ Composer.test.tsx.snap}
  80. 0 src/__tests__/__snapshots__/{Constant.test.js.snap β†’ Constant.test.tsx.snap}
  81. +0 βˆ’3 src/__tests__/__snapshots__/{Day.test.js.snap β†’ Day.test.tsx.snap}
  82. 0 src/__tests__/__snapshots__/{GiftedAvatar.test.js.snap β†’ GiftedAvatar.test.tsx.snap}
  83. 0 src/__tests__/__snapshots__/{GiftedChat.test.js.snap β†’ GiftedChat.test.tsx.snap}
  84. +1 βˆ’14 src/__tests__/__snapshots__/{InputToolbar.test.js.snap β†’ InputToolbar.test.tsx.snap}
  85. +0 βˆ’13 src/__tests__/__snapshots__/{LoadEarlier.test.js.snap β†’ LoadEarlier.test.tsx.snap}
  86. +0 βˆ’117 src/__tests__/__snapshots__/Message.test.js.snap
  87. +243 βˆ’0 src/__tests__/__snapshots__/Message.test.tsx.snap
  88. 0 src/__tests__/__snapshots__/{MessageContainer.test.js.snap β†’ MessageContainer.test.tsx.snap}
  89. +1 βˆ’35 src/__tests__/__snapshots__/{MessageImage.test.js.snap β†’ MessageImage.test.tsx.snap}
  90. +21 βˆ’15 src/__tests__/__snapshots__/{MessageText.test.js.snap β†’ MessageText.test.tsx.snap}
  91. 0 src/__tests__/__snapshots__/{Send.test.js.snap β†’ Send.test.tsx.snap}
  92. +1 βˆ’9 src/__tests__/__snapshots__/{SystemMessage.test.js.snap β†’ SystemMessage.test.tsx.snap}
  93. +0 βˆ’4 src/__tests__/__snapshots__/{Time.test.js.snap β†’ Time.test.tsx.snap}
  94. +29 βˆ’0 src/__tests__/context.tsx
  95. +0 βˆ’15 src/__tests__/utils.test.js
  96. +31 βˆ’0 src/__tests__/utils.test.ts
  97. +1 βˆ’0 src/index.ts
  98. +30 βˆ’0 src/types.ts
  99. +0 βˆ’24 src/utils.js
  100. +25 βˆ’0 src/utils.ts
  101. +0 βˆ’32 tests/context.js
  102. +21 βˆ’0 tsconfig.json
  103. +14 βˆ’0 tslint.json
  104. +3,167 βˆ’3,537 yarn.lock

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,55 @@
version: 2

test: &test
docker:
- image: circleci/node:11.10.1
steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-dependencies-

- run:
name: Installing codecov
command: sudo yarn global add codecov

- run:
name: Installing dependencies
command: yarn install

- run:
name: Check typescript
command: yarn tsc

- run:
name: Check tslint
command: yarn lint

- run:
name: Check tests
command: yarn test:coverage

- run:
name: codecov
command: codecov

- save_cache:
paths:
- node_modules
- ~/.cache/yarn
key: v1-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}

jobs:
test:
<<: *test

workflows:
version: 2
watchdog_system:
jobs:
- test:
filters:
branches:
only: /^feature\/.*$|^release\/.*$|^hotfix\/.*$/

This file was deleted.

Oops, something went wrong.
@@ -8,3 +8,4 @@ TODO.md
.vscode
Exponent-*.app
*.log
lib/
@@ -0,0 +1,11 @@
{
"trailingComma": "all",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"jsxSingleQuote": true,
"printWidth": 80
}

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,9 @@
module.exports = function(api) {
api.cache(true)
return {
presets: [
'module:metro-react-native-babel-preset',
'@babel/preset-typescript',
],
}
}

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit f247629

Please sign in to comment.
You can’t perform that action at this time.