Update typings after removing references to goog.math (#2743)

* Update typings after removing references to goog.math
This commit is contained in:
Sam El-Husseini
2019-07-30 13:19:14 -07:00
committed by GitHub
parent 57868e7e83
commit d2d621aec3
3 changed files with 10791 additions and 10854 deletions

View File

@@ -153,7 +153,11 @@ gulp.task('typings', function (cb) {
'typings/parts/blockly-header.d.ts',
'typings/parts/blockly-interfaces.d.ts',
'typings/parts/goog-closure.d.ts',
`${tmpDir}/**/**/**`
`${tmpDir}/core/**`,
`${tmpDir}/core/utils/**`,
`${tmpDir}/core/theme/**`,
`${tmpDir}/core/keyboard_nav/**`,
`${tmpDir}/msg/**`
];
return gulp.src(srcs)
.pipe(gulp.concat('blockly.d.ts'))

21579
typings/blockly.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -8,14 +8,6 @@ declare namespace goog {
dispose(): void;
}
namespace string {
let caseInsensitiveCompare: (a: string, b: string) => number;
}
namespace array {
function remove(ar: string[], v: string): void;
}
namespace dom {
function createDom(tagName: string, opt_attributes?: Object, ...var_args: Object[]): Element;
function createDom(name: string, ns?: string, children?: any): HTMLElement;
@@ -31,44 +23,6 @@ declare namespace goog {
}
}
namespace math {
class Box {
top: number;
right: number;
bottom: number;
left: number;
constructor(top: number, right: number, bottom: number, left: number);
}
class Rect {
}
class Coordinate {
x: number;
y: number;
constructor(x: number, y: number);
clone(): Coordinate;
static difference(a: Coordinate, b: Coordinate): Coordinate;
static sum(a: Coordinate, b: Coordinate): Coordinate;
static magnitude(a: Coordinate): number;
}
class Size {
width: number;
height: number;
constructor(width: number, height: number);
}
function clamp(n: number, min: number, max: number): number;
function toRadians(n: number): number;
function toDegrees(n: number): number;
}
namespace color {
function lighten(rgb: number[], factor: number): number[];
function darken(rgb: number[], factor: number): number[];
function rgbArrayToHex(rgb: number[]): string;
function hexToRgb(hex: string): number[];
function hsvToHex(hue: number, sat: number, val: number): string;
}
namespace ui {
class Control extends Component {
getChildCount(): number;
@@ -138,20 +92,6 @@ declare namespace goog {
}
}
namespace style {
let backgroundColor: number;
function getBorderBox(element: Element): math.Box;
function getMarginBox(element: Element): math.Box;
function getPaddingBox(element: Element): math.Box;
function getSize(element: Element): math.Size;
function getViewportPageOffset(doc: Document): math.Coordinate;
function scrollIntoContainerView(element: Element, opt_container?: Element, opt_center?: boolean): void;
function setHeight(element: Element, height: number | string): void;
function setWidth(element: Element, width: number | string): void;
function getPageOffset(element: Element): math.Coordinate;
function setStyle(element: Element, style: string, value: string): void;
}
namespace events {
function listen(eventSource: Element | Listenable, eventType: EventType, listener: any, capturePhase?: boolean, handler?: Object): void;
function unlistenByKey(key: any): void;