Skip to content

Definition Files are interpreted as relative "paths" #12524

Closed
@georgeedwards

Description

@georgeedwards

TypeScript Version: 2.0.10
Code

declare module com {
    export module google {
        export module android {
            export module gms {
                export module auth {
                    export class GoogleAuthUtil {
                        public static getToken(param0: android.content.Context, param1: string, param2: string): string;
                    }
                }
            }
        }
    }
}
declare module android {
    declare module content {
        export class Context {
        }
    }
}

Expected behavior:
For tsc to interpret android.content.Context as an absolute path and as such look to the declare module android and find the exported class Context.

Actual behavior:
tsc interprets android.content.Context as a relative path, looks in the namespace com.google.android rather than android., can't find content.Context and throws an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design LimitationConstraints of the existing architecture prevent this from being fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions