0.3.2 • Published 6 years ago

@reframe/typescript v0.3.2

Weekly downloads
6
License
-
Repository
github
Last release
6 years ago

Reframe + TypeScript = :heart:

@reframe/typescript

Use Reframe with TypeScript.

Usage

Add @reframe/typescript to your reframe.config.js.

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/typescript') // npm install @reframe/typescript
    ],

    // Syntax transformation is done with `@babel/preset-typescript`
    // Options:
    babelPresetTypescript: {
        isTSX: true, // default value
        allExtensions: true, // default value
    },

    // Type checking is done with `fork-ts-checker-webpack-plugin`
    // Options:
    forkTsCheckerWebpackPlugin: {
        // To enable type checking set `enable: true`
        enable: true,
    },
};

Example

// /plugins/typescript/example/pages/landing.config.tsx

import * as React from "react";

interface HelloProps { compiler: string; framework: string; }

const Hello = (props: HelloProps) => <h3>Hello from {props.compiler} and {props.framework}!</h3>;

export default {
    route: '/',
    view: () => <Hello compiler="TypeScript" framework="React" />,
    doNotRenderInBrowser: true,
};
// /plugins/typescript/example/reframe.config.js

module.exports = {
    $plugins: [
        require('@reframe/react-kit'),
        require('@reframe/typescript') // npm install @reframe/typescript
    ],

    // Syntax transformation is done with `@babel/preset-typescript`
    // Options:
    babelPresetTypescript: {
        isTSX: true, // default value
        allExtensions: true, // default value
    },

    // Type checking is done with `fork-ts-checker-webpack-plugin`
    // Options:
    forkTsCheckerWebpackPlugin: {
        // To enable type checking set `enable: true`
        enable: true,
    },
};
0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.13-next.0

7 years ago

0.1.12

7 years ago

0.1.12-next.0

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1-rc.21

7 years ago

0.0.1-rc.20

7 years ago

0.0.1-rc.19

7 years ago

0.0.1-rc.18

7 years ago

0.0.1-rc.17

7 years ago

0.0.1-rc.16

7 years ago

0.0.1-rc.15

7 years ago

0.0.1-rc.14

7 years ago

0.0.1-rc.13

7 years ago

0.0.1-rc.12

7 years ago

0.0.1-rc.11

7 years ago

0.0.1-rc.10

7 years ago

0.0.1-rc.9

7 years ago

0.0.1-rc.8

7 years ago

0.0.1-rc.7

7 years ago

0.0.1-rc.5

7 years ago

0.0.1-rc.4

7 years ago

0.0.1-rc.3

7 years ago

0.0.1-rc.2

7 years ago