Skip to content

code.context is an empty object  #15

@tunnckoCore

Description

@tunnckoCore

Hey @jonschlinkert :)

The comment's code.context is an empty object when using export default, arrow function.

/**
 * Foobar 1 with default export arrow function and typescript
 * and empty code.context
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

export default (commit: string): Commit => {};

/**
 * Foobar 2 with default export arrow function JS
 * and empty code.context
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

export default (commit) => {};

/**
 * Foobar 3 with default export named function and typescript
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

export default function foobar(commit: string): Commit {}

/**
 * Foobar 4 with default export named function javascript
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

export default function foobar(commit) {}

/**
 * Foobar 5 with default export arrow function and typescript
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

module.exports = (commit: string): Commit => {};

/**
 * Foobar 6 with default export arrow function JS
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

module.exports = (commit) => {};

/**
 * Foobar 7 with default export named function and typescript
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

module.exports = function foobar(commit: string): Commit {};

/**
 * Foobar 8 with default export named function javascript
 *
 * @param  {string} `commit` a commit message
 * @api public
 */

module.exports = function foobar(commit) {};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions