Skip to content

ts.transpile() doesn't seem to do type check #7402

Closed
@fatcerberus

Description

@fatcerberus

TypeScript Version:
1.8.5

Code

function FeedPig(what:number)
{
    print("the pig ate " + what + " pigs at 8:12");
}

FeedPig([1,2,3]);

Compiler Invocation
Using typescriptServices.js:
ts.transpile(source, null, filename)

Expected behavior:
Type error

Actual behavior:
Code compiles successfully and produces the output:

the pig ate 1,2,3 pigs at 8:12

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIRelates to the public API for TypeScriptQuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions