Skip to content

Arguments in a function passing to decorators are ignored when counting module references for emitting. #3108

Description

@vilicvane

// file a.ts

export var test = 'abc';

// file b.ts

import { test } from './a';

/**
 * if we give handler type `() => boolean`, then it emits as expected.
 * seems union type doesn't work here, either.
 */
function filter(handler: any) {
    return function (target: any) {
        // ...
    };
}

class Wat {
    @filter(() => test == 'abc')
    static whatever() {
        // ...
    }
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDuplicateAn existing issue was already created

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions