feat(platform-declarations): generate typings from iOS 13.0 SDK (#7817)

* feat(platform-declarations): generate typings from iOS 13.0 SDK

* fix(platform-declarations): typings generation script

Delete Material Components typings from `tns-platform-declarations`,
they are part of `tns-core-modules` package.

* refactor(platform-declarations): workaround a TypeScript error

Error:
```
tns-platform-declarations/ios/objc-x86_64/objc!OSLog.d.ts(178,15): error TS2417: Class static side 'typeof OSLogEnumerator' incorrectly extends base class static side 'typeof NSEnumerator'.
  Types of property 'alloc' are incompatible.
    Type '() => OSLogEnumerator' is not assignable to type '<ObjectType>() => NSEnumerator<ObjectType>'.
      Type 'OSLogEnumerator' is not assignable to type 'NSEnumerator<ObjectType>'.
        Types of property 'allObjects' are incompatible.
          Type 'NSArray<NSObject>' is not assignable to type 'NSArray<ObjectType>'.
            Type 'NSObject' is not assignable to type 'ObjectType'.
              'NSObject' is assignable to the constraint of type 'ObjectType', but 'ObjectType' could be instantiated with a different subtype of constraint '{}'.
```

References:
https://github.com/Microsoft/TypeScript/issues/17575
https://stackoverflow.com/questions/52518125/workaround-for-accessing-class-type-arguments-in-static-method-in-typescript

* docs(platform-declarations): note a manual step on generating typings

* chore(platform-declarations): exclude ios-typings-prj from transpilation

* refactor(platform-declarations): delete references to MDC types

```
ios/objc-x86_64/objc!QuartzCore.d.ts:676:36 - error TS2304: Cannot find name 'MDCAnimationTimingFunction'.

676  static mdc_functionWithType(type: MDCAnimationTimingFunction): CAMediaTimingFunction;

ios/objc-x86_64/objc!UIKit.d.ts:7717:54 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7717  static mdc_preferredFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7719:53 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7719  static mdc_standardFontForMaterialTextStyle(style: MDCFontTextStyle): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7771:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7771  mdc_fontSizedForMaterialTextStyleScaledForDynamicType(style: MDCFontTextStyle, scaled: boolean): UIFont;

ios/objc-x86_64/objc!UIKit.d.ts:7794:64 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7794  static mdc_preferredFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;

ios/objc-x86_64/objc!UIKit.d.ts:7796:63 - error TS2304: Cannot find name 'MDCFontTextStyle'.

7796  static mdc_standardFontDescriptorForMaterialTextStyle(style: MDCFontTextStyle): UIFontDescriptor;
```
This commit is contained in:
Vasil Chimev
2019-09-19 22:18:08 +03:00
committed by Manol Donev
parent dfcbe6c319
commit 3e8d6350b9
109 changed files with 25080 additions and 3190 deletions

View File

@ -192,6 +192,8 @@ declare function sqlite3_create_module(db: interop.Pointer | interop.Reference<a
declare function sqlite3_create_module_v2(db: interop.Pointer | interop.Reference<any>, zName: string, p: interop.Pointer | interop.Reference<sqlite3_module>, pClientData: interop.Pointer | interop.Reference<any>, xDestroy: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>) => void>): number;
declare function sqlite3_create_window_function(db: interop.Pointer | interop.Reference<any>, zFunctionName: string, nArg: number, eTextRep: number, pApp: interop.Pointer | interop.Reference<any>, xStep: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>, p2: number, p3: interop.Pointer | interop.Reference<interop.Pointer | interop.Reference<any>>) => void>, xFinal: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>) => void>, xValue: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>) => void>, xInverse: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>, p2: number, p3: interop.Pointer | interop.Reference<interop.Pointer | interop.Reference<any>>) => void>, xDestroy: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<any>) => void>): number;
declare function sqlite3_data_count(pStmt: interop.Pointer | interop.Reference<any>): number;
declare var sqlite3_data_directory: string;
@ -379,6 +381,7 @@ interface sqlite3_module {
xSavepoint: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<sqlite3_vtab>, p2: number) => number>;
xRelease: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<sqlite3_vtab>, p2: number) => number>;
xRollbackTo: interop.FunctionReference<(p1: interop.Pointer | interop.Reference<sqlite3_vtab>, p2: number) => number>;
xShadowName: interop.FunctionReference<(p1: string) => number>;
}
declare var sqlite3_module: interop.StructType<sqlite3_module>;
@ -592,6 +595,8 @@ declare function sqlite3_step(p1: interop.Pointer | interop.Reference<any>): num
declare function sqlite3_stmt_busy(p1: interop.Pointer | interop.Reference<any>): number;
declare function sqlite3_stmt_isexplain(pStmt: interop.Pointer | interop.Reference<any>): number;
declare function sqlite3_stmt_readonly(pStmt: interop.Pointer | interop.Reference<any>): number;
declare function sqlite3_stmt_status(p1: interop.Pointer | interop.Reference<any>, op: number, resetFlg: number): number;
@ -662,6 +667,8 @@ declare function sqlite3_value_dup(p1: interop.Pointer | interop.Reference<any>)
declare function sqlite3_value_free(p1: interop.Pointer | interop.Reference<any>): void;
declare function sqlite3_value_frombind(p1: interop.Pointer | interop.Reference<any>): number;
declare function sqlite3_value_int(p1: interop.Pointer | interop.Reference<any>): number;
declare function sqlite3_value_int64(p1: interop.Pointer | interop.Reference<any>): number;