xuri / excelize-wasm

A WebAssembly build of the Go Excelize library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
190 stars 33 forks source link

[WIP] Refactor to Typescript #4

Closed paustint closed 1 year ago

paustint commented 1 year ago

TODO:

Code is not yet working, there is some sort of error that happens and the program exits with error code 2. the global excelize object is never being set with properties, so it is failing before this

This also shows up in the logs panic: syscall/js: call of Value.Get on undefined

Also, Reflect.x appear to be invalid usage. Accord to type definitions the first parameter requires a function, but non-function values are being passed in. This should be reviewed and corrected.

Temporary items that will be cleaned up

To test the code, run npm install to install new dependencies, then run npm run build to build the JS and GO

Example of what is still failing

image

PR Details

Description

This is a 100% refactor that was generally a copy/paste of the initial codebase, but converted to Typescript and cleaned up the codebase a bit to make it easier to read and maintain.

Related Issue

none

Motivation and Context

This is a 100% refactor that was generally a copy/paste of the initial codebase, but converted to Typescript and cleaned up the codebase a bit to make it easier to read and maintain.

The codebase was using a mixture of very legacy javascript and modern javascript.

Prettier has also been added to ensure code formatting remains consistent across contributors.

How Has This Been Tested

TODO: still testing.

Types of changes

Checklist

paustint commented 1 year ago

Was unable to get this to work, going to close this PR and open a new one with just a few changes.