Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Nov 25, 2024
1 parent 6a8ccea commit dfcddb4
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,16 @@
// Type Definitions
//-----------------------------------------------------------------------------

/*
* Note: Using `import()` in the JSDoc comments below because including them as
* typedef comments here caused Rollup to remove them. I couldn't figure out why
* this was happening so just working around for now.
*/
/** @typedef {import("css-tree").SyntaxMatchError} SyntaxMatchError */

//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------

/**
* Determines if an error is a reference error.
* @param {Object} error The error object to check.
* @returns {error is import("css-tree").SyntaxReferenceError} True if the error is a reference error, false if not.
*/
export function isSyntaxReferenceError(error) {
return typeof error.reference === "string";
}

/**
* Determines if an error is a syntax match error.
* @param {Object} error The error object to check.
* @returns {error is import("css-tree").SyntaxMatchError} True if the error is a syntax match error, false if not.
* @returns {error is SyntaxMatchError} True if the error is a syntax match error, false if not.
*/
export function isSyntaxMatchError(error) {
return typeof error.syntax === "string";
Expand Down

0 comments on commit dfcddb4

Please sign in to comment.