Coder Social home page Coder Social logo

Comments (7)

lemonmade avatar lemonmade commented on July 23, 2024 1

Welp, I think the different issues are getting mixed up :P I think we are on the same page and #138 partially covers what we are after in terms of shared literal properties.

from javascript.

GoodForOneFare avatar GoodForOneFare commented on July 23, 2024

@lemonmade this is another one that'll now throw an error during decaf. FWIW, there's 80+ affected files, so I think there's a strong case for automating a fix.

from javascript.

lemonmade avatar lemonmade commented on July 23, 2024

What do you think the automated fix should look like? Should we add a Foo.prototype.bar = 123 to decaf?

from javascript.

GoodForOneFare avatar GoodForOneFare commented on July 23, 2024

Assuming that we split all classes into separate files (#125), I think we can insert any private stuff before the class definition. So:

class Shopify.AutocompleteV2
  LIST_CLASS = '.js-autocomplete-suggestions'
  PIXELS_FROM_BOTTOM_TO_INFINITE_SCROLL = 500
  ERROR_DISPLAY_TIME = 5000

  constructor: (node, @renderer, @options={}) ->

becomes

const LIST_CLASS = '.js-autocomplete-suggestions'
const PIXELS_FROM_BOTTOM_TO_INFINITE_SCROLL = 500
const ERROR_DISPLAY_TIME = 5000

class Shopify.AutocompleteV2
  constructor: (node, @renderer, @options={}) ->

from javascript.

GoodForOneFare avatar GoodForOneFare commented on July 23, 2024

Heh. Yeah, prettymuch what you just raised in #157 :)

from javascript.

lemonmade avatar lemonmade commented on July 23, 2024

👍

from javascript.

GoodForOneFare avatar GoodForOneFare commented on July 23, 2024

The mainline merge picked up a fix from Julian for this (https://github.com/shopify/decaf/blame/master/test/test.js#L1209). Closing.

from javascript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.