-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update TypeScript typings for the latest (v2.0.0) version #68
Comments
Typescript types are still broken (by this very change). Hopefully we can get a PR in, this is blocking us. |
Feel free to send a pr :) |
What error do you get? Please provide more info, so I'll be able to fix it. Ideally, a TS code sample, that doesn't compile. |
Thank you for considering this issue. As soon as we can, we'll try to get the exact error, something to repro or even directly a PR. Essentially we are just setting it up normally with Winston. There isn't much in there and TSC just fails doing type checking, pointing to this library installed in node_module/ (not pointing to our code). (I haven't tried, but potentially just having We are compiling with the "real" Typescript (not Babel) and the Typescript version is 3.0.1. |
@popbee sorry for a late reply, missed your message somehow. The following code compiles fine for me: import * as winston from "winston";
import * as WinstonGraylog2 from "winston-graylog2";
const options = {
graylog: {
servers: [
{
host: "127.0.0.1",
port: 12201,
},
],
},
};
const graylog2Transport = new WinstonGraylog2(options);
const logger = winston.createLogger({
exitOnError: true,
transports: [graylog2Transport]
});
logger.info("Hello there!", {some: 42, doge: 12}); And this one: const winston = require("winston");
const WinstonGraylog2 = require("winston-graylog2");
const options = {
graylog: {
servers: [
{
host: "127.0.0.1",
port: 12201,
},
],
},
};
const graylog2Transport = new WinstonGraylog2(options);
const logger = winston.createLogger({
exitOnError: true,
transports: [graylog2Transport]
});
logger.info("Hello there!", {some: 42, doge: 12}); Although, I personally don't use {
"compilerOptions": {
"outDir": "build",
"module": "commonjs",
"target": "ES2017"
},
"include": [
"src"
]
} |
Hello @schfkt, your example code above does trigger Typescript errors for me using latest Winston 3.2.1.
Also, I wondered if your library works out of the box with Graylog 3.0. Best |
https://github.com/namshi/winston-graylog2/releases/tag/v2.0.0 contains breaking changes that must be reflected in TS typings as well.
The text was updated successfully, but these errors were encountered: