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

Zap tries to zap d.ts files #373

Closed
lucacasonato opened this issue Feb 7, 2024 · 1 comment · Fixed by #388
Closed

Zap tries to zap d.ts files #373

lucacasonato opened this issue Feb 7, 2024 · 1 comment · Fixed by #388
Assignees
Labels
bug Something isn't working

Comments

@lucacasonato
Copy link
Member

lucacasonato commented Feb 7, 2024

// style.js
/// <reference types="./style.d.ts" />
export const CSS = "";
// style.d.ts
export const CSS: string;
TS1039 [ERROR]: Initializers are not allowed in ambient contexts.
export const CSS: string = {} as any;
                           ~~~~~~~~~
    at file:///Users/lucacasonato/projects/github.com/lucacasonato/deno-gfm/style.d.ts:1:25
@lucacasonato lucacasonato added the bug Something isn't working label Feb 7, 2024
@dsherret
Copy link
Member

dsherret commented Feb 7, 2024

Excellent--type checking step catching bugs.

By the way, zap should still zap dts files, but just not add expressions to the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants