diff --git a/types/xmlpoke/index.d.ts b/types/xmlpoke/index.d.ts
index d8566d4364..68bde4f9ab 100644
--- a/types/xmlpoke/index.d.ts
+++ b/types/xmlpoke/index.d.ts
@@ -25,6 +25,7 @@ declare module XmlPoke { // ghost module
withBasePath(xpath: string): API;
addNamespace(prefix: string, uri: string): API;
errorOnNoMatches(): API;
+ ensure(xpath: string): API;
}
interface CDataValue {
value: string;
diff --git a/types/xmlpoke/xmlpoke-tests.ts b/types/xmlpoke/xmlpoke-tests.ts
index 1079d19756..04cab2aa1f 100644
--- a/types/xmlpoke/xmlpoke-tests.ts
+++ b/types/xmlpoke/xmlpoke-tests.ts
@@ -76,3 +76,7 @@ result = xmlpoke('', xml =>
return 'y';
}));
assert.equal(result, 'y');
+
+// ensure
+result = xmlpoke('', xml => xml.ensure('a/b'));
+assert.equal(result, '');