Platform-specific TypeScript declarations for NativeScript for accessing native objects
84
{
"context": "This criteria evaluates the engineer's proficiency in using tns-platform-declarations package capabilities, specifically Platform Entry Points and Type References. It assesses whether the engineer correctly uses triple-slash reference directives to include Android and iOS type definitions.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Android reference syntax",
"description": "Uses correct triple-slash reference directive syntax for Android (/// <reference path=\"...\" />) in generateAndroidTypeFile(). Should reference the tns-platform-declarations package's Android entry point.",
"max_score": 25
},
{
"name": "iOS reference syntax",
"description": "Uses correct triple-slash reference directive syntax for iOS (/// <reference path=\"...\" />) in generateIosTypeFile(). Should reference the tns-platform-declarations package's iOS entry point.",
"max_score": 25
},
{
"name": "API level variants",
"description": "Correctly implements Android API level variants by referencing different Android declaration files (android-17.d.ts, android-21.d.ts, android-28.d.ts) based on the apiLevel parameter in generateAndroidTypeFile().",
"max_score": 30
},
{
"name": "Reference validation logic",
"description": "Implements validateTypeReferences() to properly detect triple-slash reference directives (/// <reference path=\"...\" />) in file content and validate that platform-specific paths are present (should verify Android paths contain 'android' and iOS paths contain 'ios').",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-tns-platform-declarationsevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10