bunyan: fix ts1202 errors when targeting es6

Before this change:

```
[ray@localhost DefinitelyTyped]$ tsc --noImplicitAny bunyan/bunyan-test.ts --module commonjs --target es6
bunyan/bunyan-test.ts(3,1): error TS1202: Import assignment cannot be
used when targeting ECMAScript 6 or higher. Consider using 'import * as
ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"'
instead.
bunyan/bunyan.d.ts(9,5): error TS1202: Import assignment cannot be used
when targeting ECMAScript 6 or higher. Consider using 'import * as ns
from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead.
[ray@localhost DefinitelyTyped]$
```

After this change:
```
[ray@localhost DefinitelyTyped]$ tsc --noImplicitAny bunyan/bunyan-test.ts --module commonjs --target es6
[ray@localhost DefinitelyTyped]$
```
This commit is contained in:
Ray Solomon
2015-08-19 10:10:20 -07:00
parent efa0c1196d
commit 0659ddca42
2 changed files with 4 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
/// <reference path="bunyan.d.ts" />
import bunyan = require('bunyan');
import * as bunyan from 'bunyan';
var ringBufferOptions:bunyan.RingBufferOptions = {
limit: 100

8
bunyan/bunyan.d.ts vendored
View File

@@ -6,9 +6,7 @@
/// <reference path="../node/node.d.ts" />
declare module "bunyan" {
import events = require('events');
import EventEmitter = events.EventEmitter;
import WritableStream = NodeJS.WritableStream;
import { EventEmitter } from 'events';
class Logger extends EventEmitter {
constructor(options:LoggerOptions);
@@ -52,7 +50,7 @@ declare module "bunyan" {
name: string;
streams?: Stream[];
level?: string | number;
stream?: WritableStream;
stream?: NodeJS.WritableStream;
serializers?: Serializers;
src?: boolean;
}
@@ -65,7 +63,7 @@ declare module "bunyan" {
type?: string;
level?: number | string;
path?: string;
stream?: WritableStream | Stream;
stream?: NodeJS.WritableStream | Stream;
closeOnExit?: boolean;
}