Skip to content

Compiling with --noResolve elides needed imports #3122

Closed
@breck7

Description

@breck7

car.ts:

export class Car {
    public beep(): void {}
}

truck.ts:

import Car = require("./car");
class Truck extends Car.Car {}
new Truck().beep();

I expected ./car to be defined in both of these scenarios but it's elided in the first:

'tsc --target es5 --module amd --noResolve truck.ts' => 'define(["require", "exports"]'

'tsc --target es5 --module amd truck.ts' => 'define(["require", "exports", "./car"]'

Metadata

Metadata

Assignees

No one assigned

    Labels

    By DesignDeprecated - use "Working as Intended" or "Design Limitation" instead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions