Skip to content

Translation of Typescript anyType to LLVM IR #14

@lung21

Description

@lung21

Motivation

Similar to Javascript, Typescript also supports type any that allows a variable of that type to be assigned values of any other types. This also means that the type checking is disabled whenever any is used in Typescript. Now we are trying to find how any constructs with any could be possibly translated into LLVM IR. Below is an example of one variable and two functions that are defined with any in Typescript.

Example

let obj: any = { content: 'heymycontent' };
obj = 23;

function isView(arg: any): boolean {
    // Do something here
}

// the output of this function may be of any
function calculate(argA: string, argB: number): any {
    return argA + argB;
}

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions