Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: additional doc touch ups for jsdoc #7

Merged
merged 6 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
"prepublishOnly": "npm run build:types",
"build:docs": "jsdoc -c .github/docs/conf.json -d docs",
"build:types": "tsc -p tsconfig.declaration.json",
"postinstall": "if [ \"$NODE_ENV\" = \"dev\" ] ; then npx -p install-peerdeps@latest install-peerdeps @wfcd/eslint-config@latest -S ; fi",
"prepare": "husky"
"prepare": "husky && if [ \"$NODE_ENV\" = \"dev\" ] ; then npx -p install-peerdeps@latest install-peerdeps @wfcd/eslint-config@latest -S ; fi"
},
"author": "",
"author": "SlayerOrnstein",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
Expand Down
3 changes: 3 additions & 0 deletions src/Ability.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Represents a players used ability
*/
SlayerOrnstein marked this conversation as resolved.
Show resolved Hide resolved
export default class Ability {
/**
* @param {Object} ability The ability
Expand Down
3 changes: 3 additions & 0 deletions src/ArchonCrystal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import { archonShardColor, archonShardUpgradeType } from 'warframe-worldstate-data/utilities';

/**
* Represents an Archon shard
*/
export default class ArchonCrystal {
constructor(crystal, local) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/ChallengeProgress.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Player completed or in progress challenges
*/
export default class ChallengeProgress {
constructor(challenge) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Enemy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* An enemy killed/executed by player
*/
export default class Enemy {
/**
* @param {Object} enemy The enemy
Expand Down
3 changes: 3 additions & 0 deletions src/Intrinsics.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Player's intrinsics ranks
*/
export default class Intrinsics {
constructor(skills) {
// I know this is railjack but I'm not sure what the context is
Expand Down
3 changes: 3 additions & 0 deletions src/ItemConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { colors, find } from 'warframe-items/utilities';

import mapToHex from './Util.js';

/**
* Item customizations such as colors and applied skins
*/
export default class ItemConfig {
/**
* @param {Object} config The configuration
Expand Down
3 changes: 3 additions & 0 deletions src/LoadOutInventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import LoadOutItem from './LoadOutItem.js';
import WeaponSkin from './WeaponSkin.js';
import XpInfo from './XpInfo.js';

/**
* Player loudout
*/
export default class LoadOutInventory {
constructor(item) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/LoadOutItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { parseDate, toTitleCase } from 'warframe-worldstate-data/utilities';
import ItemConfig from './ItemConfig.js';
import Polarity from './Polarity.js';

/**
* An an item in LoadOutInventory
*/
export default class LoadOutItem {
constructor(weapon) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Mission.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import { node, nodeEnemy, nodeMissionType } from 'warframe-worldstate-data/utilities';

/**
* A mission completed by the player
*/
export default class Mission {
constructor(mission, locale) {
const uniqueName = mission.Type || mission.Tag;
Expand Down
3 changes: 3 additions & 0 deletions src/OperatorLoadOuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { colors } from 'warframe-items/utilities';

import mapToHex from './Util.js';

/**
* Player's operator loadout
*/
export default class OperatorLoadOuts {
constructor(loadout) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Polarity.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import { translatePolarity } from 'warframe-worldstate-data/utilities';

/**
* A polarity in a LoadOutItem
*/
export default class Polarity {
constructor(polarity) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import Mission from './Mission.js';
import OperatorLoadOuts from './OperatorLoadOuts.js';
import Syndicate from './Syndicate.js';

/**
* A player's profile
*/
export default class Profile {
constructor(profile, locale) {
/**
Expand Down
19 changes: 15 additions & 4 deletions src/ProfileParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { parseDate } from 'warframe-worldstate-data/utilities';
import Profile from './Profile.js';
import Stats from './Stats.js';

/**
* Parser entry point
*/
export default class ProfileParser {
constructor(data, locale) {
/**
Expand All @@ -13,16 +16,24 @@ export default class ProfileParser {
*/
this.profile = new Profile(data.Results[0], locale);

// N/A
/**
* @type {number}
*/
this.techProjects = data.TechProjects;

// N/A
/**
* @type {number}
*/
this.xpComponents = data.XpCompoents;

// N/A
/**
* @type {number}
*/
this.xpCacheExpiryDate = parseDate(data.XpCacheExpiryDate);

// N/A
/**
* @type {number}
*/
this.ceremonyResetDate = parseDate(data.CeremonyResetDate);

/**
Expand Down
3 changes: 3 additions & 0 deletions src/Pvp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Player's conclave stats
*/
export default class Pvp {
constructor(pvp) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Race.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Represents a k-drive race
*/
export default class Race {
constructor(race) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Scan.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Represents an enemy scanned to the codex
*/
export default class Scan {
constructor(scan) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import Race from './Race.js';
import Scan from './Scan.js';
import Weapon from './Weapon.js';

/**
* A player's overall career stats
*/
export default class Stats {
/**
*
Expand Down
7 changes: 5 additions & 2 deletions src/Syndicate.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
/** @module */

import { syndicate } from 'warframe-worldstate-data/utilities';

export default class Syndicate {
/**
* @param {Object} affiliation The syndicate data
* @param {string} locale locale code
*/
constructor(affiliation) {
constructor(affiliation, locale) {
// TODO: name is readable but still might want to clean them up
// i.e "NewLokaSyndicate" can be "New Loka"" instead

/**
* Name of the syndicate
* @type {String}
*/
this.name = affiliation.Tag;
this.name = syndicate(affiliation.Tag, locale);

/**
* Current standing the player has with the syndicate
Expand Down
3 changes: 3 additions & 0 deletions src/Weapon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* Represents a player's used weapon stats
*/
export default class Weapon {
constructor(weapon) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/WeaponSkin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/** @module */

/**
* A weapon skin
*/
export default class WeaponSkin {
constructor(skin) {
/**
Expand Down
3 changes: 3 additions & 0 deletions src/XpInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

import { find } from 'warframe-items/utilities';

/**
* An item that has contributed to a player's mastery rank
*/
export default class XpInfo {
constructor(info) {
/**
Expand Down