Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
remove default export
  • Loading branch information
gcanti committed Feb 1, 2016
1 parent 438a57e commit 01a5843
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -173,7 +173,7 @@ function sum(a: t.Number, b: t.Number): t.Number {

**TypeScript definition file**

[tcomb.d.ts](tcomb.d.ts)
[index.d.ts](index.d.ts)

# Contributors

Expand Down
18 changes: 9 additions & 9 deletions index.d.ts
@@ -1,4 +1,4 @@
declare module __Tcomb {
declare module Tcomb {

type Predicate<T> = (x: T) => boolean;
type TypeGuardPredicate<T> = (x: any) => x is T;
Expand Down Expand Up @@ -55,8 +55,8 @@ declare module __Tcomb {
interface UnshiftCommand { $unshift: Array<any>; }
interface MergeCommand { $merge: Object; }
type Command = ApplyCommand | PushCommand | RemoveCommand | SetCommand | SpliceCommand | SwapCommand | UnshiftCommand | MergeCommand;
type Spec = Command | {[key: string]: Spec};
type Update<T> = (instance: T, spec: Spec) => T;
type UpdateSpec = Command | {[key: string]: UpdateSpec};
type Update<T> = (instance: T, spec: UpdateSpec) => T;

type Constructor<T> = Type<T> | Function;

Expand All @@ -81,22 +81,22 @@ declare module __Tcomb {
// struct
//

type Props = {[key: string]: Constructor<any>};
type Mixin = Props | Struct<any>;
type StructProps = {[key: string]: Constructor<any>};
type StructMixin = StructProps | Struct<any>;

interface Struct<T> extends Type<T> {
new (value: T): T;
meta: {
kind: string;
name: string;
identity: boolean;
props: Props;
props: StructProps;
};
update: Update<T>;
extend<E extends T>(mixins: Mixin | Array<Mixin>, name?: string): Struct<E>;
extend<E extends T>(mixins: StructMixin | Array<StructMixin>, name?: string): Struct<E>;
}

export function struct<T>(props: Props, name?: string): Struct<T>;
export function struct<T>(props: StructProps, name?: string): Struct<T>;

//
// list
Expand Down Expand Up @@ -245,4 +245,4 @@ declare module __Tcomb {
export var update: Update<Object>;
}

export default __Tcomb
export = Tcomb
2 changes: 1 addition & 1 deletion lib/fromJSON.d.ts
@@ -1,4 +1,4 @@
import t from '../.'
import * as t from '../.'

declare function fromJSON<T>(value: any, type: t.Type<T>): T;

Expand Down
2 changes: 1 addition & 1 deletion tcomb-tests.ts
@@ -1,4 +1,4 @@
import t from './index'
import * as t from './index'

//
// basic types
Expand Down

0 comments on commit 01a5843

Please sign in to comment.