/
interface.js
68 lines (68 loc) · 1.6 KB
/
interface.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* @fileoverview added by tsickle
* Generated from: test_files/interface/interface.ts
* @suppress {checkTypes,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
goog.module('test_files.interface.interface');
var module = module || { id: 'test_files/interface/interface.ts' };
goog.require('tslib');
/**
* Used by implement_import.ts
* @record
*/
function Point() { }
exports.Point = Point;
/* istanbul ignore if */
if (false) {
/** @type {number} */
Point.prototype.x;
/** @type {number} */
Point.prototype.y;
}
/**
* Used by implement_import.ts
*/
class User {
}
exports.User = User;
/* istanbul ignore if */
if (false) {
/** @type {number} */
User.prototype.shoeSize;
}
/**
* @param {!Point} p
* @return {number}
*/
function usePoint(p) {
return p.x + p.y;
}
/** @type {!Point} */
let p = { x: 1, y: 1 };
usePoint(p);
usePoint({ x: 1, y: 1 });
/**
* @record
*/
function TrickyInterface() { }
/* istanbul ignore if */
if (false) {
/** @type {number} */
TrickyInterface.prototype.foo;
/** @type {(undefined|string)} */
TrickyInterface.prototype.foobar;
/** @type {?|undefined} */
TrickyInterface.prototype.optAny;
/**
* \@param a some string value
* \@return some number value
* @override
* @type {function(string): number}
*/
TrickyInterface.prototype.hasSomeParamJsDoc;
/* Skipping illegal member name:
prototype: string;*/
/* Skipping unhandled member: [offset: number]: number;*/
/* Skipping unhandled member: (x: number): __ yuck __
number;*/
}