Skip to content

Commit

Permalink
fix: avoid handling keys as str literals
Browse files Browse the repository at this point in the history
  • Loading branch information
homer0 committed Dec 23, 2022
1 parent 57b9ca6 commit 62d89f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Expand Up @@ -62,7 +62,7 @@ const getReducer = (options) => {
* @param {string} type The type that will be used to find the string literals.
* @returns {string[]}
*/
const extractLiterals = (type) => R.match(/['"][\w\|\-\s'"]+['"](?: +)?/g, type);
const extractLiterals = (type) => R.match(/['"][\w\|\-\s'"]+['"](?: +)?(?:$|\|)/g, type);
/**
* Formats the styling of string literals inside a type. If the type doesn't use string
* literals, it will be returned without modification.
Expand Down
Expand Up @@ -9,10 +9,28 @@ module.exports = {
* @description don't transform this into a sentence
*/

/**
* @typedef {{
* 'Sr No': number;
* 'Program name': string;
* Seniority: number | null;
* "Speaker's name": string;
* }} MemoriesRow
*/

//# output

/**
* don't transform this into a sentence
*
* @type {Object} Something
*/

/**
* @typedef {{
* 'Sr No': number;
* 'Program name': string;
* Seniority: number | null;
* "Speaker's name": string;
* }} MemoriesRow
*/

0 comments on commit 62d89f8

Please sign in to comment.