/ nativescript

TypeScript with NativeScript

module private 접근시

declare module "ui/tab-view" {
  interface TabView {
    _viewPager: {
      setOffscreenPageLimit : (count: number) => void;
    };
  }
}

typescript 가 아닌 경우 처리

var Sqlite: NativeSqlite = require("nativescript-sqlite");
declare interface NativeSqlite {
  RESULTSASOBJECT:number;
  new(name: string):Promise<NativeSqliteDb>;
  exists:(name: string) => boolean;
}

declare interface NativeSqliteDb {
  resultType(type: number);
  all(query: string):Promise<any[]>;
  all(query: string, params: any[]):Promise<any[]>;
  execSQL(query: string):Promise<any>;
  execSQL(query: string, params: any[]):Promise<any>;
  version():Promise<number>;
  version(version: number):Promise<number>;
}