Skip to content

Commit

Permalink
improve the TS types
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Oct 17, 2024
1 parent d39deab commit c501ec4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/index.d.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type * as PROJ from '../swig/proj.d.ts';
export type * as Proj from '../swig/proj.d.ts';
export type * from '../swig/proj.d.ts';

/*
* Embedded file system access, available only in WASM
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import qPROJ from 'proj.js';

// This allows for easier access to the TypeScript types
// which are hidden behind a Promise
import type { Proj } from 'proj.js';
import type * as Proj from 'proj.js';

// refer to the webpack configuration to ses how this works
// @ts-ignore
Expand Down
1 change: 0 additions & 1 deletion test/browser/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as path from 'node:path';
import * as process from 'node:process';
import { fileURLToPath } from 'node:url';
import * as glob from 'glob';

Expand Down
2 changes: 1 addition & 1 deletion test/shared/coordinateoperation.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from 'chai';

import qPROJ from 'proj.js';
import type { Proj } from 'proj.js';
import type * as Proj from 'proj.js';

describe('CoordinateOperation with automatic import', () => {
let PROJ: Awaited<typeof qPROJ>;
Expand Down
2 changes: 1 addition & 1 deletion test/shared/crs.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assert } from 'chai';

import qPROJ from 'proj.js';
import type { Proj } from 'proj.js';
import type * as Proj from 'proj.js';

describe('CRS with automatic import', () => {
let PROJ: Awaited<typeof qPROJ>;
Expand Down
4 changes: 2 additions & 2 deletions test/shared/quickstart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { assert } from 'chai';
import qPROJ from 'proj.js';

// This allows for easier access to the TypeScript types
// which are hidden behind a Promise
import type { Proj } from 'proj.js';
// which are hidden behind a Promise and PROJ is actually a variable
import type * as Proj from 'proj.js';

// These tests are shared between Node.js and the browser
export default function (_PROJ: typeof qPROJ) {
Expand Down

0 comments on commit c501ec4

Please sign in to comment.