-
Notifications
You must be signed in to change notification settings - Fork 67
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
Typescript definition #54
Comments
this should be enough declare module 'pino-elasticsearch' {
import {DestinationStream} from 'pino';
import {ConnectionOptions as TlsConnectionOptions} from 'tls';
import Connection, {AgentOptions} from '@elastic/elasticsearch/lib/Connection';
import {BasicAuth, ApiKeyAuth, BearerAuth} from '@elastic/elasticsearch/lib/pool';
type DynamicIndexFunction = (logTime: string) => string;
interface NodeOptions {
url: URL;
id?: string;
agent?: AgentOptions;
ssl?: TlsConnectionOptions;
headers?: Record<string, any>;
roles?: {
master: boolean;
data: boolean;
ingest: boolean;
ml: boolean;
};
}
export interface Options {
index?: string | DynamicIndexFunction;
op_type?: string;
'es-version'?: number;
'flush-bytes'?: number;
node?: string | string[] | NodeOptions | NodeOptions[];
auth?: BasicAuth | ApiKeyAuth | BearerAuth;
cloud?: {
id: string;
// TODO: remove username and password here in 8
username?: string;
password?: string;
};
ssl?: TlsConnectionOptions;
Connection?: typeof Connection;
}
export default function pinoElasticSearch(opts: Options): DestinationStream;
} |
+1 |
Would you like to send a Pull Request to address this issue? Remember to add unit tests, we use tsd for types. |
plz help ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to use this package as module in a Typescript project.
However I can't find typescript definition.
It would be great to have it for integrating into Typescript projects.
The text was updated successfully, but these errors were encountered: