Вы также можете использовать расширение модуля, где вы расширяете типы во внешних модулях:
import { TextField } from 'tns-core-modules/ui/text-field';
declare module 'tns-core-modules/ui/text-field' {
export interface TextField {
unfocus(): void;
}
}
TextField.prototype.unfocus = function (this: TextField) {
this.dismissSoftInput();
if (this.android) {
this.android.clearFocus();
}
};
export function onMainGridLayoutTap(args: EventData) {
const mainGridLayout = <GridLayout>args.object;
const emailTextField: TextField = mainGridLayout.getViewById("emailTextField");
emailTextField.unfocus();
}
Используйте функциональность расширения свойства Checkstyle. В Вашем checkstyle.xml
объявите Ваш SupressionFilter
как:
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.suppressions.file}" default="suppressions.xml"/>
</module>
Затем измените свою задачу Checkstyle в Вашем сценарии сборки Муравья для включения вложенного свойства:
<checkstyle config="conf/checkstyle.xml">
<fileset dir="src" includes="**/*.java"/>
<property key="checkstyle.suppressions.file" value="conf/suppressions.xml"/>
</checkstyle>