-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Coder-Spirit/fix-symbols-import-on-deno
fix: suport nominal-symbols in deno "pkg"
- Loading branch information
Showing
5 changed files
with
30 additions
and
18 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
export const __BaseType: unique symbol = Symbol('__BaseType') | ||
export const __Properties: unique symbol = Symbol('__Properties') | ||
export const __Brand: unique symbol = Symbol('__Brand') | ||
|
||
export const __PropertyName: unique symbol = Symbol('__PropertyName') | ||
export const __PropertyValues: unique symbol = Symbol('__PropertyValues') | ||
|
||
// Some Nominal tricks rely on the fact that this symbol and its type won't be | ||
// exported as public to the library's users. | ||
const __ImpossibleSymbol: unique symbol = Symbol('__Impossible') | ||
export type __Impossible = typeof __ImpossibleSymbol | ||
// We re-export, instead of directly importing from the package, for | ||
// compatibility reasons. Typescript and NodeJS are still in very | ||
// early stages when it comes to ES modules support. | ||
export { | ||
__BaseType, | ||
__Properties, | ||
__Brand, | ||
__PropertyName, | ||
__PropertyValues, | ||
type __Impossible | ||
} from 'https://deno.land/x/[email protected]/nominal-symbols/deno/index.ts' |
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 |
---|---|---|
|
@@ -13,5 +13,9 @@ run() | |
|
||
async function run(): Promise<void> { | ||
const esmDir = join(__dirname, '..', 'deno') | ||
await processDirectory(esmDir, '.ts') | ||
await processDirectory( | ||
esmDir, | ||
'.ts', | ||
[['@coderspirit/nominal-symbols', 'https://deno.land/x/[email protected]/nominal-symbols/deno/index.ts']] | ||
) | ||
} |
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