Function - Overloaded Function (Overloaded)

Model Funny


Same function name but with a different signature (list of parameters)

Their will be then the same function name or an operator but that manipulates two different objects (data structure, type).


Function / Method

declare function getWidget(n: number): Widget;
declare function getWidget(s: string): Widget[];


built-in operators such as addition (+), can be:

  • integer addition
  • or floating-point addition.

The two operations work on different types of operands and require different functions.

Documentation / Reference

Discover More
Java Conceptuel Diagram
Java - (Method|Functions)

A function that belong to an object is called a methods. A static method is then a sort of function. Methods: operate on an object's internal state and serve as the primary mechanism for object-to-object...
Card Puncher Data Processing
Language - Features

Features of a language. ...
Vector Addition Arrow
Linear Algebra - Vector Vector Operations

Vector Vector Operations: (also known as addition or substraction) (Scaling) Using operator overloading, you can compute this operations with the following syntax. Operation Syntax...
Typescript - ( Declaration | Definition ) file ( .d.ts file)

library definition file are known in typesecript/javascript as declaration files or .d.ts files. They describe the library in terms of class, function, type. They are ambient. By default, all visible...
Typescript - Overloading

in typescript You can declare two possible type for a variable Example when you want to store a object

Share this page:
Follow us:
Task Runner