mirror of
https://github.com/denoland/deno.git
synced 2024-12-12 02:27:46 -05:00
14 lines
222 B
TypeScript
14 lines
222 B
TypeScript
|
/**
|
||
|
* ```ts
|
||
|
* import { add } from "./mod.ts";
|
||
|
*
|
||
|
* add(1, 2);
|
||
|
*
|
||
|
* // @ts-expect-error: can only add numbers
|
||
|
* add('1', '2');
|
||
|
* ```
|
||
|
*/
|
||
|
export function add(first: number, second: number) {
|
||
|
return first + second;
|
||
|
}
|