Files
NativeScript/tns-platform-declarations
Dimitar Tachev a94ec9946f Improve ImageAsset scaling (#5110)
* Do not depend on current device screen while calculating Image Asset size.

* Scale the image asset to the exact requested size.

* Process image assets natively, pass keepAspectRatio based on the stretch property and Asset options.

* Fixed the splashscreen resource name as it cannot be read when containing a dot.

* Updated the Image Asset scale and rotate logic based on the Native one.

* Make the ImageAsset size more important than the Image decode size as its more specific.

* Fixed tslint errors.

* Added filePath support in the ImageAsset constructor for iOS in order to unify it with the Android implementation, support for relative files and file not found support errors.

* Added unit tests for ImageAssets.

* Added a sample app for UI testing of image-view with ImageAsset src.

* chore: apply PR comments
2018-02-28 14:04:01 +02:00
..
2016-09-27 09:48:22 +03:00
2017-02-20 10:24:22 +02:00

This plugin contains type information about the native platforms as exposed by the NativeScript framework.

Offically supported entry points:

  • android.d.ts - For android SDK and runtime types.
  • ios.d.ts - For iOS SDK and runtime types.

Using the declarations may conflict with DOM typings, consider using TypeScript 2.x.x and the following settings in your tsconfig.json:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es5",
        "experimentalDecorators": true,
        "lib": [
            "es6",
            "dom"
        ]
    }
}

Create reference.d.tsand add the following content:

/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />

d.ts files require a lot of memory and CPU. Consider adding skipLibCheck option to tsconfig file.