Giter Site home page Giter Site logo

babel-plugin-test-export's People

Contributors

benoitzugmeyer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

babel-plugin-test-export's Issues

JSDoc can bug the plugin

This code doesn't expose the marked as exposed function

'use strict'

// Using false will remove the entry from the object and will ease the roles retrieval
const Overrides = {
    zob : true,
}

/**
 * Filter rights according to their Boolean value
 * @param {Object} rights An object with rights to filter on
 * @return {Set} The list of rights available to this user
 */
// @test-export
function format(rights) {
    console.log('whatever')
}

module.exports = {}

But this one does

'use strict'

// Using false will remove the entry from the object and will ease the roles retrieval
const Overrides = {
    zob : true,
}

/**
 * Filter rights according to their Boolean value
 * @param {Object} rights An object with rights to filter on
 * @return {Set} The list of rights available to this user
 */
// @test-export
function format(rights) {
    console.log('whatever')
}

module.exports = {}

The diff between the two is the following:

diff --git a/toto.js b/Volumes/Work/euronews/api/src/utils/rights.js
index a7907b3..9901739 100644
--- a/toto.js
+++ b/Volumes/Work/euronews/api/src/utils/rights.js
@@ -2,7 +2,7 @@
 
 // Using false will remove the entry from the object and will ease the roles retrieval
 const Overrides = {
-//    zob : true,
+    zob : true,
 }
 
 /**
@@ -16,4 +16,3 @@ function format(rights) {
 }
 
 module.exports = {}

I tried looking at the src but I must admit I'm no good at reCAST ๐Ÿ˜†

Clarify the situation with ES modules

They are not supported as-is, but maybe it can be supported if babel-plugin-transform-es2015-modules-commonjs is run before babel-plugin-test-export

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.