CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-tns-platform-declarations

Platform-specific TypeScript declarations for NativeScript for accessing native objects

84

1.23x
Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer uses the tns-platform-declarations package to access and configure AndroidX Material Design components, specifically the CardView from the androidx.cardview.widget package. The focus is on proper type reference inclusion, native view instantiation, and property configuration using AndroidX APIs.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Triple-slash reference",
      "description": "Includes the appropriate triple-slash reference directive at the top of the file (e.g., /// <reference path=\"node_modules/tns-platform-declarations/android.d.ts\" />) to enable AndroidX type definitions",
      "max_score": 10
    },
    {
      "name": "CardView instantiation",
      "description": "Correctly instantiates androidx.cardview.widget.CardView using the native Android constructor (e.g., new androidx.cardview.widget.CardView(context))",
      "max_score": 25
    },
    {
      "name": "Corner radius configuration",
      "description": "Uses the CardView.setRadius() method to configure corner radius",
      "max_score": 15
    },
    {
      "name": "Elevation configuration",
      "description": "Uses the CardView.setCardElevation() method to set the card's elevation",
      "max_score": 15
    },
    {
      "name": "Background color configuration",
      "description": "Uses the CardView.setCardBackgroundColor() method to set the card's background color",
      "max_score": 15
    },
    {
      "name": "Child view management",
      "description": "Uses the CardView.addView() method to add child views to the card container",
      "max_score": 10
    },
    {
      "name": "Context handling",
      "description": "Properly obtains and uses an Android Context object (e.g., via android.app.Application.getContext() or similar) when instantiating native views",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-tns-platform-declarations

tile.json