🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

ember-cli-typescript

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
e

ember-cli-typescript

Allow Ember apps to use TypeScript files.

5.3.0
latest
97

Supply Chain Security

100

Vulnerability

100

Quality

82

Maintenance

100

License

Shell access

Supply chain risk

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Found 1 instance in 1 package

Dependencies have 5 high alerts.

Socket optimized override available

Version published
Weekly downloads
556K
-3.92%
Maintainers
5
Weekly downloads
 
Created
Issues
19

What is ember-cli-typescript?

ember-cli-typescript is an addon for Ember.js that enables TypeScript support in Ember applications. It provides a seamless integration of TypeScript into the Ember build pipeline, allowing developers to write their Ember code in TypeScript, which offers static type checking and other benefits.

What are ember-cli-typescript's main functionalities?

TypeScript Integration

This feature allows you to write Ember components using TypeScript. The code sample demonstrates a simple Glimmer component written in TypeScript, with type annotations for the component's arguments.

import Component from '@glimmer/component';

interface MyComponentArgs {
  name: string;
}

export default class MyComponent extends Component<MyComponentArgs> {
  get greeting(): string {
    return `Hello, ${this.args.name}!`;
  }
}

Type Checking

Type checking ensures that the types of the arguments passed to components are correct. The code sample shows a type error when an incorrect type is passed to the component.

import Component from '@glimmer/component';

interface MyComponentArgs {
  name: string;
}

export default class MyComponent extends Component<MyComponentArgs> {
  get greeting(): string {
    return `Hello, ${this.args.name}!`;
  }
}

// This will cause a type error
let component = new MyComponent({ name: 123 });

TypeScript Configuration

This feature allows you to configure TypeScript settings for your Ember project. The code sample shows a typical tsconfig.json file used to configure the TypeScript compiler options and include paths.

{
  "compilerOptions": {
    "target": "es6",
    "module": "esnext",
    "strict": true,
    "noImplicitAny": true,
    "moduleResolution": "node",
    "baseUrl": ".",
    "paths": {
      "*": ["types/*"]
    }
  },
  "include": [
    "app/**/*",
    "tests/**/*"
  ]
}

Other packages similar to ember-cli-typescript

FAQs

Package last updated on 05 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts