-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix recursive collectable id inference
- Loading branch information
Showing
6 changed files
with
61 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const IdParser_js_1 = require("../IdParser.js"); | ||
const recursiveCollectionId = 'sundered_isles/collections/oracles/core'; | ||
const recursiveCollectableId = 'sundered_isles/oracles/core/action'; | ||
const nonRecursiveCollectionId = 'starforged/collections/moves/combat'; | ||
const nonRecursiveCollectableId = 'starforged/moves/combat/strike'; | ||
const nonCollectableId = 'delve/site_themes/hallowed'; | ||
const testParse = [ | ||
IdParser_js_1.IdParser.from(recursiveCollectableId), | ||
IdParser_js_1.IdParser.from(nonRecursiveCollectionId), | ||
IdParser_js_1.IdParser.from(recursiveCollectionId), | ||
IdParser_js_1.IdParser.from(nonRecursiveCollectableId), | ||
IdParser_js_1.IdParser.from(nonCollectableId) | ||
]; | ||
for (const id of testParse) | ||
const recursiveCollectionString = 'sundered_isles/collections/oracles/core'; | ||
const recursiveCollectableString = 'sundered_isles/oracles/core/action'; | ||
const nonRecursiveCollectionString = 'starforged/collections/moves/combat'; | ||
const nonRecursiveCollectableString = 'starforged/moves/combat/strike'; | ||
const nonCollectableString = 'delve/site_themes/hallowed'; | ||
const recursiveCollectableId = IdParser_js_1.IdParser.from(recursiveCollectableString); | ||
const nonRecursiveCollectionId = IdParser_js_1.IdParser.from(nonRecursiveCollectionString); | ||
const recursiveCollectionId = IdParser_js_1.IdParser.from(recursiveCollectionString); | ||
const nonRecursiveCollectableId = IdParser_js_1.IdParser.from(nonRecursiveCollectableString); | ||
const nonCollectableId = IdParser_js_1.IdParser.from(nonCollectableString); | ||
for (const id of [ | ||
recursiveCollectableId, | ||
recursiveCollectionId, | ||
nonRecursiveCollectableId, | ||
nonRecursiveCollectionId, | ||
nonCollectableId | ||
]) | ||
console.log(id.toString(), id.toPath().join('.')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
import type * as Strings from './Strings.js' | ||
import { IdParser } from '../IdParser.js' | ||
|
||
const recursiveCollectionId = | ||
const recursiveCollectionString = | ||
'sundered_isles/collections/oracles/core' satisfies Strings.RecursiveCollectionId | ||
const recursiveCollectableId = | ||
const recursiveCollectableString = | ||
'sundered_isles/oracles/core/action' satisfies Strings.RecursiveCollectableId | ||
const nonRecursiveCollectionId = | ||
const nonRecursiveCollectionString = | ||
'starforged/collections/moves/combat' satisfies Strings.NonRecursiveCollectionId | ||
const nonRecursiveCollectableId = | ||
const nonRecursiveCollectableString = | ||
'starforged/moves/combat/strike' satisfies Strings.NonRecursiveCollectableId | ||
const nonCollectableId = | ||
const nonCollectableString = | ||
'delve/site_themes/hallowed' satisfies Strings.NonCollectableId | ||
const testParse = [ | ||
IdParser.from(recursiveCollectableId), | ||
IdParser.from(nonRecursiveCollectionId), | ||
IdParser.from(recursiveCollectionId), | ||
IdParser.from(nonRecursiveCollectableId), | ||
IdParser.from(nonCollectableId) | ||
] | ||
|
||
for (const id of testParse) console.log(id.toString(), id.toPath().join('.')) | ||
const recursiveCollectableId = IdParser.from(recursiveCollectableString) | ||
|
||
const nonRecursiveCollectionId = IdParser.from(nonRecursiveCollectionString) | ||
const recursiveCollectionId = IdParser.from(recursiveCollectionString) | ||
|
||
const nonRecursiveCollectableId = IdParser.from(nonRecursiveCollectableString) | ||
const nonCollectableId = IdParser.from(nonCollectableString) | ||
|
||
for (const id of [ | ||
recursiveCollectableId, | ||
recursiveCollectionId, | ||
nonRecursiveCollectableId, | ||
nonRecursiveCollectionId, | ||
nonCollectableId | ||
]) | ||
console.log(id.toString(), id.toPath().join('.')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters