Skip to content

Commit 2fea2a1

Browse files
committed
fix: typings
1 parent 8c8ee5b commit 2fea2a1

File tree

4 files changed

+17
-25
lines changed

4 files changed

+17
-25
lines changed

src/label-common.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Label as LabelViewDefinition, TextShadow } from './label';
1+
import { isIOS } from 'tns-core-modules/platform';
2+
import { CssProperty, InheritedCssProperty, makeParser, makeValidator, Property } from 'tns-core-modules/ui/core/properties';
23
import { booleanConverter, Color, CSSType, dip } from 'tns-core-modules/ui/core/view';
34
import { Label as TNLabel } from 'tns-core-modules/ui/label';
45
import { Style } from 'tns-core-modules/ui/styling/style';
5-
import { CssProperty, InheritedCssProperty, makeParser, makeValidator, Property } from 'tns-core-modules/ui/core/properties';
6-
import { isIOS } from 'tns-core-modules/platform';
76
import { layout } from 'tns-core-modules/utils/utils';
7+
import { Label as LabelViewDefinition, TextShadow } from './label';
88

99
export const cssProperty = (target: Object, key: string | symbol) => {
1010
// property getter

src/label.android.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShadowProperty, VerticalTextAlignment, verticalTextAlignmentProperty } from './label-common';
2-
// import { backgroundColorProperty } from 'tns-core-modules/ui/page/page';
3-
import { TextTransform, VerticalAlignment, verticalAlignmentProperty, WhiteSpace, whiteSpaceProperty } from 'tns-core-modules/ui/text-base/text-base';
1+
import * as application from 'tns-core-modules/application';
2+
import * as fs from 'tns-core-modules/file-system';
3+
import { categories as traceCategories, isEnabled as traceEnabled, messageType as traceMessageType, write as traceWrite } from 'tns-core-modules/trace';
44
import { Font } from 'tns-core-modules/ui/styling/font';
5+
import { FontWeight, genericFontFamilies, parseFontFamily } from 'tns-core-modules/ui/styling/font-common';
6+
// import { backgroundColorProperty } from 'tns-core-modules/ui/page/page';
7+
import { TextTransform, WhiteSpace, whiteSpaceProperty } from 'tns-core-modules/ui/text-base/text-base';
58
import { layout } from 'tns-core-modules/utils/utils';
9+
import { TextShadow } from './label';
10+
import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShadowProperty, VerticalTextAlignment, verticalTextAlignmentProperty } from './label-common';
611

712
Font.prototype.getAndroidTypeface = function() {
813
if (!this._typeface) {
@@ -35,11 +40,6 @@ function ContentPackageName() {
3540
}
3641
return _ContentPackageName;
3742
}
38-
import * as application from 'tns-core-modules/application';
39-
import * as fs from 'tns-core-modules/file-system';
40-
import { categories as traceCategories, isEnabled as traceEnabled, messageType as traceMessageType, write as traceWrite } from 'tns-core-modules/trace';
41-
import { Font as FontBase, FontWeight, genericFontFamilies, parseFontFamily } from 'tns-core-modules/ui/styling/font-common';
42-
import { TextShadow } from './label';
4343
let appAssets: android.content.res.AssetManager;
4444
const typefaceCache = new Map<string, android.graphics.Typeface>();
4545
const FONTS_BASE_PATH = '/fonts/';

src/label.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ export declare class Label extends TNLabel {
1515
/**
1616
* Gets the native [android widget](http://developer.android.com/reference/android/widget/TextView.html) that represents the user interface for this component. Valid only when running on Android OS.
1717
*/
18-
android?: any /* android.widget.TextView */;
18+
android: any /* android.widget.TextView */;
1919

2020
/**
2121
* Gets the native [UITextView](https://developer.apple.com/documentation/uikit/uitextview) that represents the user interface for this component. Valid only when running on iOS.
2222
*/
23-
ios?: any /* UITextView */;
23+
ios: any /* UITextView */;
2424

2525
/**
2626
* Gets or sets html string for the HtmlView.

src/label.ios.ts

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShadowProperty } from './label-common';
2-
import { layout } from 'tns-core-modules/utils/utils';
31
import { fontInternalProperty, Length, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty, View } from 'tns-core-modules/ui/page/page';
42
import { Font } from 'tns-core-modules/ui/styling/font';
5-
import {
6-
borderBottomWidthProperty,
7-
borderLeftWidthProperty,
8-
borderRightWidthProperty,
9-
borderTopWidthProperty,
10-
TextTransform,
11-
WhiteSpace,
12-
whiteSpaceProperty
13-
} from 'tns-core-modules/ui/text-base/text-base';
14-
import { TextShadow, verticalTextAlignmentProperty, VerticalTextAlignment } from './label';
3+
import { borderBottomWidthProperty, borderLeftWidthProperty, borderRightWidthProperty, borderTopWidthProperty, TextTransform, WhiteSpace, whiteSpaceProperty } from 'tns-core-modules/ui/text-base/text-base';
154
import { isString } from 'tns-core-modules/utils/types';
5+
import { layout } from 'tns-core-modules/utils/utils';
6+
import { TextShadow, VerticalTextAlignment, verticalTextAlignmentProperty } from './label';
7+
import { htmlProperty, LabelBase, lineBreakProperty, maxLinesProperty, textShadowProperty } from './label-common';
168

179
export * from './label-common';
1810
enum FixedSize {

0 commit comments

Comments
 (0)