Skip to content

Commit

Permalink
Merge pull request #9 from 0xStarcat/typescript
Browse files Browse the repository at this point in the history
Typescript
  • Loading branch information
0xStarcat authored Apr 18, 2021
2 parents af0400c + 16845c1 commit 6f0f392
Show file tree
Hide file tree
Showing 25 changed files with 668 additions and 276 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
*

# But not these files...
!dist/index.js
!/dist/
!dist/*
1 change: 1 addition & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'circular-natal-horoscope-js';
274 changes: 3 additions & 271 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/types/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _exports: any;
export = _exports;
3 changes: 3 additions & 0 deletions dist/types/lib/ephemeris-1.2.1.bundle.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare const _exports: any;
export = _exports;
export var Ephemeris: any;
22 changes: 22 additions & 0 deletions dist/types/src/Aspect.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/** Class representing an aspect. */
export default class Aspect {
/**
* Create an aspect.
* @param {string} id - The string id that a pair of aspects should share. (Sun - Moon) should = "sun-moon" and (Moon - Sun) should = "sun-moon" too.
* @param {bool} isPrimary - The designation for the point being the primary aspect of the pair. (Sun - Moon) should be primary and (Moon - Sun) should not be.
* @param {string} point1Key - The id token of point1 - please refer to list
* @param {string} point2Key - The id token of point2 - please refer to list
* @param {string} aspectKey - The key of the aspect - please refer to ASPECTS constant
*/
constructor({ point1Key, point2Key, aspectKey, orb, orbUsed, language }?: string);
point1Key: any;
point1Label: any;
point2Label: any;
point2Key: any;
aspectKey: any;
aspectLevel: any;
aspectLevelLabel: any;
label: any;
orb: any;
orbUsed: any;
}
26 changes: 26 additions & 0 deletions dist/types/src/ChartPosition.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
export default class ChartPosition {
constructor({ horizonDegrees, eclipticDegrees }?: {
horizonDegrees?: number;
eclipticDegrees?: number;
});
Horizon: {
DecimalDegrees: number;
ArcDegrees: {
degrees: number;
minutes: number;
seconds: number;
};
ArcDegreesFormatted: string;
ArcDegreesFormatted30: string;
};
Ecliptic: {
DecimalDegrees: number;
ArcDegrees: {
degrees: number;
minutes: number;
seconds: number;
};
ArcDegreesFormatted: string;
ArcDegreesFormatted30: string;
};
}
125 changes: 125 additions & 0 deletions dist/types/src/Horoscope.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
export class Horoscope {
static HouseSystems(language?: string): {
value: string;
label: any;
}[];
static HouseLabels(language?: string): {
key: number;
label: any;
}[];
static ZodiacSystems(language?: string): {
value: string;
label: any;
}[];
static ZodiacLabels(language?: string): {
key: string;
label: any;
}[];
static CelestialLabels(language?: string): any[];
static Languages(language?: string): {
key: string;
value: string;
label: any;
}[];
static AspectLabels(language?: string): {
key: string;
label: any;
defaultOrb: any;
angle: any;
level: any;
levelLabel: any;
}[];
constructor({ origin, language, houseSystem, zodiac, aspectPoints, aspectWithPoints, aspectTypes, customOrbs }?: {
origin?: any;
language?: string;
houseSystem?: string;
zodiac?: string;
aspectPoints?: string[];
aspectWithPoints?: string[];
aspectTypes?: string[];
customOrbs?: {};
});
origin: any;
_language: string;
_houseSystem: any;
_zodiac: any;
_ascendant: {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
_midheaven: {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
_sunSign: Sign;
_houses: any;
_zodiacCusps: {
ChartPosition: ChartPosition;
Sign: any;
}[];
_aspectTypes: any;
_aspectPoints: any;
_aspectWithPoints: any;
_customOrbs: any;
Ephemeris: any;
_celestialBodies: any;
_celestialPoints: any;
_aspects: {
all: any[];
types: {};
points: {};
};
createAscendant(): {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
createMidheaven(): {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
createSunSign(zodiac: any, language: any): Sign;
createZodiacCusps(): {
ChartPosition: ChartPosition;
Sign: any;
}[];
createHouses(string: any): any;
processCelestialBodies(ephemerisResults: any): any;
processCelestialPoints(ephemerisResults: any): any;
get Ascendant(): {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
get Midheaven(): {
key: string;
label: any;
Sign: any;
ChartPosition: ChartPosition;
};
get SunSign(): Sign;
get Houses(): any;
get ZodiacCusps(): {
ChartPosition: ChartPosition;
Sign: any;
}[];
get Angles(): any;
get CelestialBodies(): any;
get CelestialPoints(): any;
get Aspects(): {
all: any[];
types: {};
points: {};
};
}
export default Horoscope;
import ChartPosition from "./ChartPosition";
import Sign from "./Sign";
20 changes: 20 additions & 0 deletions dist/types/src/House.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default class House {
static convertIdToKey(id: any): string;
constructor({ ascendantDegrees, eclipticDegreesStart, eclipticDegreesEnd, id, zodiac, language }?: {
ascendantDegrees?: number;
eclipticDegreesStart?: number;
eclipticDegreesEnd?: number;
id?: number;
zodiac?: string;
language?: string;
});
_language: string;
id: number;
label: any;
ChartPosition: {
StartPosition: ChartPosition;
EndPosition: ChartPosition;
};
Sign: any;
}
import ChartPosition from "./ChartPosition";
36 changes: 36 additions & 0 deletions dist/types/src/Origin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export class Origin {
constructor({ year, month, date, hour, minute, second, latitude, longitude }?: {
year?: number;
month?: number;
date?: number;
hour?: number;
minute?: number;
second?: number;
latitude?: number;
longitude?: number;
});
year: any;
month: any;
date: any;
hour: any;
minute: any;
latitude: number;
longitude: number;
timeObject: {
year: number;
month: number;
date: number;
hour: number;
minute: number;
second: number;
millisecond: number;
};
timezone: any;
localTime: any;
localTimeFormatted: any;
utcTime: any;
utcTimeFormatted: any;
julianDate: number;
localSiderealTime: number;
}
export default Origin;
19 changes: 19 additions & 0 deletions dist/types/src/Sign.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default Sign;
declare class Sign {
static Astronomical(language: any): Sign[];
static Sidereal(language: any): Sign[];
static Tropical(language: any): Sign[];
static OfType(zodiac: any, language?: string): Sign[];
constructor({ key, zodiac, language }?: {
key?: string;
zodiac?: string;
language?: string;
});
key: string;
zodiac: any;
label: any;
get StartDate(): any;
get EndDate(): any;
get ZodiacStart(): number;
get ZodiacEnd(): number;
}
8 changes: 8 additions & 0 deletions dist/types/src/ZodiacPosition.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default ZodiacPosition;
declare class ZodiacPosition {
constructor({ decimalDegrees, zodiac }?: {
decimalDegrees?: number;
zodiac?: string;
});
Sign: any;
}
113 changes: 113 additions & 0 deletions dist/types/src/constants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/**
@constant
@type {object}
default orbs from https://astro-charts.com/blog/2018/how-customize-orbs-your-charts/
*/
export const ASPECTS: object;
export namespace BODIES {
namespace sun {
const label: string;
}
namespace moon {
const label_1: string;
export { label_1 as label };
}
namespace mercury {
const label_2: string;
export { label_2 as label };
}
namespace venus {
const label_3: string;
export { label_3 as label };
}
namespace mars {
const label_4: string;
export { label_4 as label };
}
namespace jupiter {
const label_5: string;
export { label_5 as label };
}
namespace saturn {
const label_6: string;
export { label_6 as label };
}
namespace uranus {
const label_7: string;
export { label_7 as label };
}
namespace neptune {
const label_8: string;
export { label_8 as label };
}
namespace pluto {
const label_9: string;
export { label_9 as label };
}
namespace chiron {
const label_10: string;
export { label_10 as label };
}
namespace sirius {
const label_11: string;
export { label_11 as label };
}
}
export namespace POINTS {
namespace northnode {
const label_12: string;
export { label_12 as label };
}
namespace southnode {
const label_13: string;
export { label_13 as label };
}
namespace lilith {
const label_14: string;
export { label_14 as label };
}
}
export namespace ANGLES {
namespace ascendant {
const label_15: string;
export { label_15 as label };
}
namespace midheaven {
const label_16: string;
export { label_16 as label };
}
}
export const HOUSES: {
'1': {
label: string;
};
};
export const SIGNS: ({
key: string;
startDate: {
tropical: any;
sidereal: any;
astronomical: any;
};
endDate: {
tropical: any;
sidereal: any;
astronomical: any;
};
zodiacStart: number;
zodiacEnd: number;
} | {
key: string;
startDate: {
astronomical: any;
tropical?: undefined;
sidereal?: undefined;
};
endDate: {
astronomical: any;
tropical?: undefined;
sidereal?: undefined;
};
zodiacStart: number;
zodiacEnd: number;
})[];
3 changes: 3 additions & 0 deletions dist/types/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Origin } from "./Origin";
import { Horoscope } from "./Horoscope";
export { Origin, Horoscope };
Loading

0 comments on commit 6f0f392

Please sign in to comment.