Skip to content

Commit

Permalink
Use correct type for options (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-m authored Jul 23, 2023
1 parent af91bc2 commit 1b0629e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/signed-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ export class SignedXml {
* @returns If no callback is provided, returns `this` (the instance of SignedXml).
* @throws TypeError If the xml can not be parsed, or Error if there were invalid options passed.
*/
computeSignature(xml: string, options: ErrorFirstCallback<SignedXml>): void;
computeSignature(xml: string, options: ComputeSignatureOptions): void;

/**
* Compute the signature of the given XML (using the already defined settings).
Expand Down
9 changes: 0 additions & 9 deletions test/signature-unit-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[local-name(.)='name']" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
attrs: attrs,
});

Expand Down Expand Up @@ -188,7 +187,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[@wsu:Id]" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
existingPrefixes: {
wsu: "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
},
Expand Down Expand Up @@ -244,7 +242,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[local-name(.)='repository']" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
location: {
reference: "/root/name",
action: "append",
Expand All @@ -269,7 +266,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[local-name(.)='repository']" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
location: {
reference: "/root/name",
action: "prepend",
Expand All @@ -294,7 +290,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[local-name(.)='repository']" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
location: {
reference: "/root/name",
action: "before",
Expand All @@ -319,7 +314,6 @@ describe("Signature unit tests", function () {
sig.addReference({ xpath: "//*[local-name(.)='repository']" });

sig.computeSignature(xml, {
// @ts-expect-error FIXME
location: {
reference: "/root/name",
action: "after",
Expand Down Expand Up @@ -571,7 +565,6 @@ describe("Signature unit tests", function () {
digestAlgorithm: "http://dummyDigest",
});

// @ts-expect-error FIXME
sig.computeSignature(xml, { prefix: prefix });
const signature = sig.getSignatureXml();

Expand Down Expand Up @@ -894,7 +887,6 @@ describe("Signature unit tests", function () {

try {
sig.computeSignature(xml, {
// @ts-expect-error FIXME
location: {
reference: "/root/foobar",
action: "append",
Expand Down Expand Up @@ -932,7 +924,6 @@ describe("Signature unit tests", function () {
sig.getKeyInfoContent = getKeyInfoContentWithAssertionId.bind(this, { assertionId });
sig.privateKey = fs.readFileSync("./test/static/client.pem");
sig.computeSignature(xml, {
// @ts-expect-error FIXME
prefix: "ds",
location: {
reference: "//Assertion",
Expand Down

0 comments on commit 1b0629e

Please sign in to comment.