Skip to content

Explicitly add type annotations to exported constants in expr-library #283

@AnyhowStep

Description

@AnyhowStep

Instead of,

export const concat = makeOperator1ToN<OperatorType.CONCAT, string, string>(
    OperatorType.CONCAT,
    tm.string(),
    TypeHint.STRING
);

Use this,

export const concat : Operator1ToN<string, string> = makeOperator1ToN<OperatorType.CONCAT, string, string>(
    OperatorType.CONCAT,
    tm.string(),
    TypeHint.STRING
);

We cannot rely on type inference. We need to explicitly add type annotations or AMD declaration emit will break.

Keep an eye on this,
microsoft/TypeScript#37267

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions