-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial version after transliteration from jsofa
there have been some manual tweaks, but it mainly still has a 'Java'-like feel. The api might change slightly to be more idiomatic TypeScript in places.
- Loading branch information
Showing
17 changed files
with
29,048 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules/ | ||
/.idea/ | ||
/dist/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
@tsastro:registry=https://npm.pkg.github.com |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Developing | ||
========== | ||
|
||
The library was created from an automated transliteration of the [JSOFA library](https://github.com/Javastro/jsofa) using [jsweet](https://www.jsweet.org). There has been some hand editing of the code since the automatic transliteration, and it is expected that any updates from the upstream IAU SOFA library will also be hand written. | ||
|
Binary file not shown.
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,2 +1,5 @@ | ||
# tsofa | ||
TypeScript Transliteration of the IAU SOFA library | ||
# TSOFA | ||
TypeScript transliteration of the [IAU SOFA](http://www.iausofa.org) library. | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@tsastro/tsofa", | ||
"version": "18.0.0", | ||
"type": "module", | ||
"description": "a typescript transcription of the IAU SOFA library", | ||
"author": "Paul Harrison <[email protected]>", | ||
"license": "MIT", | ||
"private": false, | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "testyts", | ||
"doc": "typedoc src/main/ts/TSOFA.ts", | ||
"eslint": "eslint ." | ||
}, | ||
"main": "dist/TSOFA.js", | ||
"types": "dist/TSOFA.d.ts", | ||
"files": [ | ||
"/dist" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tsastro/tsofa.git" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://npm.pkg.github.com" | ||
}, | ||
"keywords": [ | ||
"Astrometry", | ||
"Astronomy" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/tsastro/tsofa/issues" | ||
}, | ||
"homepage": "https://github.com/tsastro/tsofa#readme", | ||
"devDependencies": { | ||
"@types/node": "^20.7.1", | ||
"@typescript-eslint/eslint-plugin": "^6.17.0", | ||
"@typescript-eslint/parser": "^6.17.0", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-jsdoc": "^46.8.1", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"testyts": "^1.5.0", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.25.6", | ||
"typescript": "^5.2.2" | ||
}, | ||
"dependencies": {} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */ | ||
/** | ||
* Base class for TSOFA exceptions. | ||
* . | ||
* @author Paul Harrison ([email protected]) 21 Nov 2011 | ||
* @version $Revision$ $date$ | ||
* @param {string} message | ||
* @param {number} status | ||
* @class | ||
* @extends Error | ||
*/ | ||
export class TSOFAException extends Error { | ||
/** | ||
* Comment for <code>serialVersionUID</code> | ||
*/ | ||
static serialVersionUID: number = 4100437038026589596; | ||
|
||
/** | ||
* Original TSOFA status value; | ||
*/ | ||
/*private*/ status: number; | ||
|
||
public getStatus(): number { | ||
return this.status; | ||
} | ||
|
||
public constructor(message: string, status: number) { | ||
super(message); this.message=message; | ||
(<any>Object).setPrototypeOf(this, TSOFAException.prototype); | ||
if (this.status === undefined) { this.status = 0; } | ||
this.status = status; | ||
} | ||
} | ||
TSOFAException["__class"] = "org.jastronomy.TSOFA.TSOFAException"; | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */ | ||
|
||
import { TSOFAException } from "./TSOFAException"; | ||
/** | ||
* Exception reporting some form of convergence failure in an algorithm. | ||
* @param {string} message | ||
* @param {number} status | ||
* @class | ||
* @extends TSOFAException | ||
*/ | ||
export class TSOFAFailedConvergenceException extends TSOFAException { | ||
/** | ||
* Comment for <code>serialVersionUID</code> | ||
*/ | ||
static __org_jastronomy_TSOFA_TSOFAFailedConvergenceException_serialVersionUID: number = 4417087001300889769; | ||
|
||
public constructor(message: string, status: number) { | ||
super(message, status); | ||
(<any>Object).setPrototypeOf(this, TSOFAFailedConvergenceException.prototype); | ||
} | ||
} | ||
TSOFAFailedConvergenceException["__class"] = "org.jastronomy.TSOFA.TSOFAFailedConvergenceException"; | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */ | ||
import { TSOFAException } from "./TSOFAException"; | ||
/** | ||
* Various forms of illegal parameters are reported with this execption. | ||
* . | ||
* @author Paul Harrison ([email protected]) 21 Nov 2011 | ||
* @version $Revision$ $date$ | ||
* @param {string} message | ||
* @param {number} status | ||
* @class | ||
* @extends org.jastronomy.TSOFA.TSOFAException | ||
*/ | ||
export class TSOFAIllegalParameter extends TSOFAException { | ||
/** | ||
* Comment for <code>serialVersionUID</code> | ||
*/ | ||
static __org_jastronomy_jsofa_TSOFAIllegalParameter_serialVersionUID: number = 4164536110692125140; | ||
|
||
public constructor(message: string, status: number) { | ||
super(message, status); | ||
(<any>Object).setPrototypeOf(this, TSOFAIllegalParameter.prototype); | ||
} | ||
} | ||
TSOFAIllegalParameter["__class"] = "org.jastronomy.jsofa.TSOFAIllegalParameter"; | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* Generated from Java with JSweet 3.1.0 - http://www.jsweet.org */ | ||
import { TSOFAException } from "./TSOFAException"; | ||
/** | ||
* Exception signalling a internal error. | ||
* . | ||
* @author Paul Harrison ([email protected]) 21 Nov 2011 | ||
* @version $Revision$ $date$ | ||
* @param {string} message | ||
* @param {number} status | ||
* @class | ||
* @extends org.jastronomy.jsofa.TSOFAException | ||
*/ | ||
export class TSOFAInternalError extends TSOFAException { | ||
/** | ||
* Comment for <code>serialVersionUID</code> | ||
*/ | ||
static __org_jastronomy_jsofa_TSOFAInternalError_serialVersionUID: number = 6067803703985219165; | ||
|
||
public constructor(message: string, status: number) { | ||
super(message, status); | ||
(<any>Object).setPrototypeOf(this, TSOFAInternalError.prototype); | ||
} | ||
} | ||
TSOFAInternalError["__class"] = "org.jastronomy.jsofa.TSOFAInternalError"; | ||
|
||
|
Oops, something went wrong.