typescript - DefinitelyTyped log4javascript missing module declaration -
i'm having hard time using following typings file in project:
https://github.com/definitelytyped/definitelytyped/tree/master/log4javascript
apperantly, file missing module declaration, causing typescript complain can't find module 'log4javascript' when put following statement in typescript file:
import * log4javascript 'log4javascript';
when manually edit index.d.ts file installed running command
typings install dt~log4javascript --global --save
and add module declaration:
declare module "log4javascript" { import test = log4javascript; export = test; }
at end of file, compiler no longer complains , code works without using import *
statement.
so how supposed use typings file can use log4javascript typescript?
update
i've managed work around creating custom.d.ts
file declares log4javascript module alongside generated root index.d.ts of typings , added ///<reference path="..." />
statement in main.ts file used requirejs.
still don't feel correct way it, works now.
Comments
Post a Comment