Git Product home page Git Product logo

interfaces's Introduction

@dojo/interfaces

Build Status npm version

This package contain TypeScript interfaces and types that are widely used across Dojo 2 packages. It is designed to make it easier to maintain these interfaces as well as build code that integrates well with the rest of the Dojo 2 packages without requiring a hard dependency on those other packages.

WARNING This is beta software. While we do not anticipate significant changes to the API at this stage, we may feel the need to do so. This is not yet production ready, so you should use at your own risk.

Usage

To use @dojo/interfaces install the package:

npm install @dojo/interfaces

Features

bases

Evented and Destroyable interfaces, which are used throughout many packages, specifically@dojo/core and @dojo/widget-core.

Evented defines an interface for objects that emit events, while Destroyable defines an interface for objects that have own and destroy methods.

core

Common, foundational interfaces used widely throughout most Dojo 2 packages. Includes Handle and event related interfaces EventObject, and EventTargettedObject.

loader

Interfaces for working with @dojo/loader. If the loader is included on the page, you can reference the loader with:

import { DojoRequire } from '@dojo/interfaces/loader';
declare const require: DojoRequire;

require(['some-module'], (someModule) => {
});

shim

Thenable and ArrayLike interfaces. Thenable will allow you to use promise-like objects without pulling in @dojo/shim.

vdom

A set of interfaces for working with widgets and the virtual DOM. To work with a VNode:

import { VNode } from '@dojo/interfaces/vdom';

let node: VNode;

node = someFlag ? v('div') : v('p');

How do I contribute?

We appreciate your interest! Please see the Dojo 2 Meta Repository for the Contributing Guidelines and Style Guide.

Installation

To start working with this package, clone the repository and run npm install.

In order to build the project run grunt dev or grunt dist.

Testing

Since this is a type only package, we are currently working on the best way to test this package.

Licensing information

ยฉ 2017 JS Foundation. New BSD license.

interfaces's People

Contributors

agubler avatar kitsonk avatar rishson avatar lzhoucs avatar rorticus avatar maier49 avatar edhager avatar jdonaghue avatar vansimke avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.