FLYNNLABAboutMeCodingActivityStudy 2024초등수학
TypeScript with NativeScript
2016-03-14
typescript, 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>;
}