-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(fileimport service): Part 1 - port to typescript as-is #3962
base: main
Are you sure you want to change the base?
Conversation
📸 Preview service has generated an image. |
📸 Preview service has generated an image. |
@@ -58,7 +98,7 @@ module.exports = class ServerAPI { | |||
delete insertionObject.__tree | |||
delete insertionObject.__closure | |||
|
|||
insertionObject.totalChildrenCount = object.__closures.length | |||
insertionObject.totalChildrenCount = object.__closure?.length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript caught a bug here 🐛
@@ -224,9 +243,24 @@ async function doTask(mainDb, regionName, taskDb, task) { | |||
throw new Error(`File type ${info.fileType} is not supported`) | |||
} | |||
|
|||
const output = JSON.parse(fs.readFileSync(TMP_RESULTS_PATH)) | |||
const output: unknown = JSON.parse(fs.readFileSync(TMP_RESULTS_PATH, 'utf8')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And another possible bug here caught by typescript 🐛
📸 Preview service has generated an image. |
📸 Preview service has generated an image. |
📸 Preview service has generated an image. |
📸 Preview service has generated an image. |
Description & motivation
Typescript port of some of the FileImport service. No other refactoring (apart from a directory nest).
Copy & paste of the preview service typescript boilerplate.
Changes:
/src
directory within file import packageTo-do before merge:
Screenshots:
Validation of changes:
Checklist:
References