Giter Site home page Giter Site logo

Review code about application-base-js HOT 5 CLOSED

esri avatar esri commented on May 30, 2024
Review code

from application-base-js.

Comments (5)

jcfranco avatar jcfranco commented on May 30, 2024
  • Some variables are typed as any. E.g., defaultConfig, defaultSettings

  • Need to use declared decorator, as shown here, for creating classes.

  • locale, under Properties section, should be typed as string to be consistent with other properties.

  • Some promise-result types can be narrowed down instead of using any.

  • Properties from settings can be renamed using deconstruction:

    const { environment: environmentSettings, group: groupSettings, /* ... */ } = settings;
  • This and this can be simplified by not checking for length.

  • Private methods can be extracted into separate utilities

  • Some conditional logic can be simplified:

    const isEsriAppsPath = esriAppsPathIndex !== -1; // `? true : false;` not needed
  • Typo: _foramatUrlParamValue -> _formatUrlParamValue

  • ApplicationBaseItemPromises and Direction could be moved to interfaces.d.ts

Minor

  • Rename:
    • RTLLocales -> rtlLocales
    • _setupCORS -> _setUpCORS
    • webmapX -> webMapX/websceneX -> webSceneX
    • _queryItem -> _loadItem? (applies to others too)
    • ptl -> portal and type as any when setting helperServices
  • checkSignIn can be dropped
  • New line after property name headers

from application-base-js.

driskull avatar driskull commented on May 30, 2024

👍 thanks!! I'll work on these

from application-base-js.

driskull avatar driskull commented on May 30, 2024

Updated with: 44e9695

Thanks @jcfranco!

I'll think about how I can move more functions into separate modules. I don't want these functions to be documented so maybe a support module that starts with an underscore?

from application-base-js.

jcfranco avatar jcfranco commented on May 30, 2024

I don't want these functions to be documented so maybe a support module that starts with an underscore?

👍 Although, I think you could still split them up without the underscore.

from application-base-js.

driskull avatar driskull commented on May 30, 2024

I got all the TypeScripty things updated

from application-base-js.

Related Issues (18)

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.