mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
new package: resolve-protobuf-schema (#36602)
* npx dts-gen --dt --name resolve-protobuf-schema -t module * drafted types * npx prettier --write .\types\resolve-protobuf-schema\** * fixed linting issues
This commit is contained in:
parent
93bff1f0f1
commit
24c734b95c
14
types/resolve-protobuf-schema/index.d.ts
vendored
Normal file
14
types/resolve-protobuf-schema/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for resolve-protobuf-schema 2.1
|
||||
// Project: https://github.com/mafintosh/resolve-protobuf-schema
|
||||
// Definitions by: Claas Ahlrichs <https://github.com/claasahl>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.7
|
||||
|
||||
import { Schema } from 'protocol-buffers-schema/types';
|
||||
|
||||
declare namespace ResolveProtobufSchema {
|
||||
function sync(file: string): Schema;
|
||||
}
|
||||
|
||||
declare function ResolveProtobufSchema(file: string, callback: (error: Error | null, schema?: Schema) => void): void;
|
||||
export = ResolveProtobufSchema;
|
||||
@ -0,0 +1,9 @@
|
||||
import resolve from 'resolve-protobuf-schema';
|
||||
|
||||
// resolve.sync(path) sync version of resolve
|
||||
resolve.sync('./test.proto');
|
||||
|
||||
// resolve(path, cb) read and resolve a schema
|
||||
resolve('./test.proto', (error, schema) => {
|
||||
// ...
|
||||
});
|
||||
24
types/resolve-protobuf-schema/tsconfig.json
Normal file
24
types/resolve-protobuf-schema/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"resolve-protobuf-schema-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/resolve-protobuf-schema/tslint.json
Normal file
1
types/resolve-protobuf-schema/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user