This is a bit of noob question, so I apologize. I am coming to TypeScript with Angular2 and I am still working to understand typings. I am not sure how to install this package, complete with the ConsoleAppender, and BasicLayout. Here's what I am doing so far:
But ConsoleAppender, and BasicLayout cannot be found. If I try to add these to my import, I get:
Module 'log4ts' has no exported member 'ConsoleAppender'
Looking at the source, I can see that neither BasicLayout, nor ConsoleAppender are included in the main index.d.ts file. These have their own definition files, however. I assume you structured it this way so that I could import the implementations of the appender/layout I want, and leave the others omitted.
This is where I am stuck. How do I "typings install" those other definitions?
I have tried: typings install npm:log4ts/build/appenders/ConsoleAppender.d.ts --save, which installs this type definition in my typings.json, but I still cannot import.
import { ConsoleAppender } from "log4ts";
import { ConsoleAppender } from "log4ts/ConsoleAppender";
This is a bit of noob question, so I apologize. I am coming to TypeScript with Angular2 and I am still working to understand
typings
. I am not sure how to install this package, complete with the ConsoleAppender, and BasicLayout. Here's what I am doing so far:This allows me to import Logger and LoggerConfig:
But ConsoleAppender, and BasicLayout cannot be found. If I try to add these to my import, I get:
Looking at the source, I can see that neither BasicLayout, nor ConsoleAppender are included in the main
index.d.ts
file. These have their own definition files, however. I assume you structured it this way so that I could import the implementations of the appender/layout I want, and leave the others omitted.This is where I am stuck. How do I "typings install" those other definitions?
I have tried:
typings install npm:log4ts/build/appenders/ConsoleAppender.d.ts --save
, which installs this type definition in mytypings.json
, but I still cannot import.Both of those fail with the same error as before.
My
typings.json
currently looks like this:The log4ts dependency in my
package.json
looks like:"log4ts": "^0.4.1"