Skip to content

Remove patching class ExpensiMark with an object #41

Closed

Description

@tomekzaw

Currently, we need to patch expensify-common/lib/ExpensiMark.js to convert class ExpensiMark into a single object because Hermes does not support ES Classes (facebook/hermes#685 (comment)).

In particular, we had to make the following changes:

  1. Remove class keyword:
-export default class ExpensiMark {
+export const ExpensiMark = {
  1. Rename constructor to initializer:
-    constructor() {
+    initializer() {
  1. Add commas after method definitions:
-    }
+    },

It would be better to use a Babel plugin to automatically convert class ExpensiMark into something that Hermes can deal with.

Activity

  1. tomekzaw commented on Jul 15, 2024

    @tomekzaw
    ContributorAuthor

    Done in #360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions