mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
Fix gulp-mustache types (#25165)
* Fix gulp-mustache types * Fix `gulp-mustache` test
This commit is contained in:
committed by
Ryan Cavanaugh
parent
68d4475fa9
commit
182a90fc99
@@ -4,6 +4,33 @@ import { Transform } from "stream";
|
||||
mustache({ // $ExpectType Transform
|
||||
msg: "Hello Gulp!"
|
||||
});
|
||||
mustache({
|
||||
name: "Chris",
|
||||
value: 10000,
|
||||
taxed_value: 10000 - (10000 * 0.4),
|
||||
in_ca: true
|
||||
});
|
||||
mustache({
|
||||
repo: [
|
||||
{ name: "resque" },
|
||||
{ name: "hub" },
|
||||
{ name: "rip" }
|
||||
]
|
||||
});
|
||||
mustache({
|
||||
name: "Willy",
|
||||
wrapped: () => {
|
||||
return (text: string, render: (arg: string) => string) => {
|
||||
return `<b>${render(text)}</b>`;
|
||||
};
|
||||
}
|
||||
});
|
||||
mustache({
|
||||
"person?": { name: "Jon" }
|
||||
});
|
||||
mustache({
|
||||
repo: []
|
||||
});
|
||||
|
||||
mustache({ // $ExpectType Transform
|
||||
msg: "Hello Gulp!",
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ declare namespace GulpMustache {
|
||||
type View = Hash | string | undefined;
|
||||
|
||||
interface Hash {
|
||||
[key: string]: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
|
||||
Reference in New Issue
Block a user