top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which are the different data types supported by TypeScript?

0 votes
549 views
Which are the different data types supported by TypeScript?
posted Dec 1, 2017 by Jayshree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

TypeScript supports the following data types:

  • Boolean var bValue: boolean = false;
  • Number var age: number = 16;
  • String var name: string = "jon";
  • Array var list:number[] = [1, 2, 3];
  • Enum

    enum Color {Red, Green, Blue};
    var c: Color = Color.Green;

  • Any var unknownType: any = 4;

  • Void

    function NoReturnType(): void {
    }

answer Dec 1, 2017 by Shivaranjini
Similar Questions
0 votes

I need to reuse my Javascript module in typescript for my angular application. Can you guide me how to do that ?

...