All files / testing / _test_utils.ts

100.00% Branches 0/0
75.00% Lines 18/24
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
x2
x2
x2
 
x2
x54
x54
x54
 
x2
x25
x25
 
 
 
x2
x3
x3
x4
x4
x4
x4
x2
 
 
 
 
 
 
 
 






























// Copyright 2018-2025 the Deno authors. MIT license.
export class Point {
  x: number;
  y: number;

  constructor(x: number, y: number) {
    this.x = x;
    this.y = y;
  }
  // deno-lint-ignore no-explicit-any
  action(...args: any[]): any {
    return args[0];
  }
  toString(): string {
    return [this.x, this.y].join(", ");
  }
  explicitTypes(_x: number, _y: string) {
    return true;
  }
  *[Symbol.iterator](): IterableIterator<number> {
    yield this.x;
    yield this.y;
  }
}

export function stringifyPoint(point: Point) {
  return point.toString();
}

export type PointWithExtra = Point & {
  nonExistent: () => number;
};