mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* adding swagger-parser declarations and tests * adding noImplicitThis option * adding changes based on feedback from Andy * using overloads; fixing tests
12 lines
258 B
TypeScript
12 lines
258 B
TypeScript
import parser = require("swagger-parser");
|
|
|
|
// Without callback which returns a promise
|
|
parser.parse("test.yaml").then((file: string) => {
|
|
console.log(file);
|
|
});
|
|
|
|
// With callback
|
|
parser.parse("test.yaml", {}, (err, file) => {
|
|
console.log(file);
|
|
});
|