chore: Adding return types to Dart facades

Closes #758
This commit is contained in:
Kevin Moore 2015-02-23 11:44:59 -08:00 committed by Misko Hevery
parent d1f03e509b
commit fad25c2b10
3 changed files with 11 additions and 11 deletions

View File

@ -144,13 +144,13 @@ class DOM {
static bool hasClass(Element element, String classname) =>
element.classes.contains(classname);
static setStyle(Element element, String stylename, String stylevalue) {
static void setStyle(Element element, String stylename, String stylevalue) {
element.style.setProperty(stylename, stylevalue);
}
static removeStyle(Element element, String stylename) {
static void removeStyle(Element element, String stylename) {
element.style.removeProperty(stylename);
}
static getStyle(Element element, String stylename) {
static String getStyle(Element element, String stylename) {
return element.style.getPropertyValue(stylename);
}
@ -193,8 +193,8 @@ class DOM {
}
class CSSRuleWrapper {
static isPageRule(CssRule rule) => rule is CssPageRule;
static isStyleRule(CssRule rule) => rule is CssStyleRule;
static isMediaRule(CssRule rule) => rule is CssMediaRule;
static isKeyframesRule(CssRule rule) => rule is CssKeyframesRule;
static bool isPageRule(CssRule rule) => rule is CssPageRule;
static bool isStyleRule(CssRule rule) => rule is CssStyleRule;
static bool isMediaRule(CssRule rule) => rule is CssMediaRule;
static bool isKeyframesRule(CssRule rule) => rule is CssKeyframesRule;
}

View File

@ -193,14 +193,14 @@ bool assertionsEnabled() {
// Can't be all uppercase as our transpiler would think it is a special directive...
class Json {
static parse(String s) => convert.JSON.decode(s);
static stringify(data) => convert.JSON.encode(data);
static String stringify(data) => convert.JSON.encode(data);
}
class DateWrapper {
static fromMillis(int ms) {
static DateTime fromMillis(int ms) {
return new DateTime.fromMillisecondsSinceEpoch(ms);
}
static now() {
static DateTime now() {
return new DateTime.now();
}
}

View File

@ -3,7 +3,7 @@ library angular.core.facade.math;
import 'dart:core' show double, num;
import 'dart:math' as math;
var NaN = double.NAN;
const NaN = double.NAN;
class Math {
static num pow(num x, num exponent) {