mirror of
https://github.com/denoland/deno.git
synced 2024-12-30 02:59:11 -05:00
51 lines
850 B
TypeScript
51 lines
850 B
TypeScript
|
/**
|
||
|
* ```
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* ```js
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* ```jsx
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* ```ts
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* ```tsx
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* ```text
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*
|
||
|
* @module doc
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* ```ts
|
||
|
* import { assertEquals } from "@std/assert/equals";
|
||
|
*
|
||
|
* assertEquals(add(1, 2), 3);
|
||
|
* ```
|
||
|
*/
|
||
|
export function add(a: number, b: number): number {
|
||
|
return a + b;
|
||
|
}
|