Advertisement
Luigi666

pter0st3llar

Jan 4th, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.47 KB | None | 0 0
  1.  
  2. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:35:29
  3. TS2349: This expression is not callable.
  4. Type 'FileUploadData' has no call signatures.
  5. 33 | const { close } = useContext(DialogWrapperContext);
  6. 34 | const uploads = ServerContext.useStoreState((state) =>
  7. > 35 | state.files.uploads.sort((a, b) => a.name.localeCompare(b.name))
  8. | ^^^^
  9. 36 | );
  10. 37 |
  11. 38 | return (
  12.  
  13. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:35:35
  14. TS7006: Parameter 'a' implicitly has an 'any' type.
  15. 33 | const { close } = useContext(DialogWrapperContext);
  16. 34 | const uploads = ServerContext.useStoreState((state) =>
  17. > 35 | state.files.uploads.sort((a, b) => a.name.localeCompare(b.name))
  18. | ^
  19. 36 | );
  20. 37 |
  21. 38 | return (
  22.  
  23. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:35:38
  24. TS7006: Parameter 'b' implicitly has an 'any' type.
  25. 33 | const { close } = useContext(DialogWrapperContext);
  26. 34 | const uploads = ServerContext.useStoreState((state) =>
  27. > 35 | state.files.uploads.sort((a, b) => a.name.localeCompare(b.name))
  28. | ^
  29. 36 | );
  30. 37 |
  31. 38 | return (
  32.  
  33. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:40:27
  34. TS7006: Parameter 'file' implicitly has an 'any' type.
  35. 38 | return (
  36. 39 | <div className={'space-y-2 mt-6'}>
  37. > 40 | {uploads.map((file) => (
  38. | ^^^^
  39. 41 | <div key={file.name} className={'flex items-center space-x-3 bg-gray-700 p-3 rounded'}>
  40. 42 | <Tooltip content={`${Math.floor((file.loaded / file.total) * 100)}%`} placement={'left'}>
  41. 43 | <div className={'flex-shrink-0'}>
  42.  
  43. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:67:39
  44. TS2349: This expression is not callable.
  45. Type 'FileUploadData' has no call signatures.
  46. 65 | const count = ServerContext.useStoreState((state) => state.files.uploads.length);
  47. 66 | const progress = ServerContext.useStoreState((state) => ({
  48. > 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  49. | ^^^^^^
  50. 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  51. 69 | }));
  52. 70 |
  53.  
  54. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:67:47
  55. TS7006: Parameter 'count' implicitly has an 'any' type.
  56. 65 | const count = ServerContext.useStoreState((state) => state.files.uploads.length);
  57. 66 | const progress = ServerContext.useStoreState((state) => ({
  58. > 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  59. | ^^^^^
  60. 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  61. 69 | }));
  62. 70 |
  63.  
  64. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:67:54
  65. TS7006: Parameter 'file' implicitly has an 'any' type.
  66. 65 | const count = ServerContext.useStoreState((state) => state.files.uploads.length);
  67. 66 | const progress = ServerContext.useStoreState((state) => ({
  68. > 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  69. | ^^^^
  70. 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  71. 69 | }));
  72. 70 |
  73.  
  74. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:68:36
  75. TS2349: This expression is not callable.
  76. Type 'FileUploadData' has no call signatures.
  77. 66 | const progress = ServerContext.useStoreState((state) => ({
  78. 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  79. > 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  80. | ^^^^^^
  81. 69 | }));
  82. 70 |
  83. 71 | useEffect(() => {
  84.  
  85. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:68:44
  86. TS7006: Parameter 'count' implicitly has an 'any' type.
  87. 66 | const progress = ServerContext.useStoreState((state) => ({
  88. 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  89. > 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  90. | ^^^^^
  91. 69 | }));
  92. 70 |
  93. 71 | useEffect(() => {
  94.  
  95. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:68:51
  96. TS7006: Parameter 'file' implicitly has an 'any' type.
  97. 66 | const progress = ServerContext.useStoreState((state) => ({
  98. 67 | uploaded: state.files.uploads.reduce((count, file) => count + file.loaded, 0),
  99. > 68 | total: state.files.uploads.reduce((count, file) => count + file.total, 0),
  100. | ^^^^
  101. 69 | }));
  102. 70 |
  103. 71 | useEffect(() => {
  104.  
  105. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:72:13
  106. TS2367: This condition will always return 'false' since the types 'FileUploadData' and 'number' have no overlap.
  107. 70 |
  108. 71 | useEffect(() => {
  109. > 72 | if (count === 0) {
  110. | ^^^^^^^^^^^
  111. 73 | setOpen(false);
  112. 74 | }
  113. 75 | }, [count]);
  114.  
  115. ERROR in resources/scripts/components/server/files/FileManagerStatus.tsx:79:14
  116. TS2365: Operator '>' cannot be applied to types 'FileUploadData' and 'number'.
  117. 77 | return (
  118. 78 | <>
  119. > 79 | {count > 0 && (
  120. | ^^^^^^^^^
  121. 80 | <Tooltip content={`${count} files are uploading, click to view`}>
  122. 81 | <button className={'flex items-center justify-center w-10 h-10'} onClick={setOpen.bind(this, true)}>
  123. 82 | <Spinner progress={(progress.uploaded / progress.total) * 100} className={'w-8 h-8'} />
  124.  
  125. ERROR in resources/scripts/components/server/files/UploadButton.tsx:34:31
  126. TS2339: Property 'appendFileUpload' does not exist on type 'RecursiveActions<ServerFileStore>'.
  127. 32 | const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);
  128. 33 | const directory = ServerContext.useStoreState((state) => state.files.directory);
  129. > 34 | const { clearFileUploads, appendFileUpload, removeFileUpload } = ServerContext.useStoreActions(
  130. | ^^^^^^^^^^^^^^^^
  131. 35 | (actions) => actions.files
  132. 36 | );
  133. 37 |
  134.  
  135. ERROR in resources/scripts/state/server/index.ts:33:86
  136. TS2339: Property 'isNodeUnderMaintenance' does not exist on type 'Server'.
  137. 31 | }
  138. 32 |
  139. > 33 | return state.data.status !== null || state.data.isTransferring || state.data.isNodeUnderMaintenance;
  140. | ^^^^^^^^^^^^^^^^^^^^^^
  141. 34 | }),
  142. 35 |
  143. 36 | isInstalling: computed((state) => {
  144. error Command failed with exit code 2.
  145. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  146. root@vmi900287:/var/www/pterodactyl#
  147.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement