Upgrade typescript dependency version#368
Merged
xenova merged 1 commit intohuggingface:mainfrom Oct 24, 2023
Merged
Conversation
Fix typegen incorrectly outputs const for non-readonly fields
Collaborator
|
Great! Thanks so much! btw, do you have any links to typescript changelogs where they mention this bugfix? |
Contributor
Author
Contributor
Author
Contributor
Author
|
@xenova The This PR should be ready. |
Collaborator
|
I can confirm that this does mark env vars as non-constant (and should fix #361): 5.0.2: types/env.d.ts export namespace env {
export namespace backends {
export { onnx_env as onnx };
export const tfjs: {};
}
export { __dirname };
export { VERSION as version };
export const allowRemoteModels: boolean;
export const remoteHost: string;
export const remotePathTemplate: string;
export const allowLocalModels: boolean;
export { localModelPath };
export { FS_AVAILABLE as useFS };
export { WEB_CACHE_AVAILABLE as useBrowserCache };
export { FS_AVAILABLE as useFSCache };
export { DEFAULT_CACHE_DIR as cacheDir };
export const useCustomCache: boolean;
export const customCache: any;
}
declare const onnx_env: any;
declare const __dirname: any;
declare const VERSION: "2.7.0";
declare const localModelPath: any;
declare const FS_AVAILABLE: boolean;
declare const WEB_CACHE_AVAILABLE: boolean;
declare const DEFAULT_CACHE_DIR: any;
export {};5.2.2: types/env.d.ts export namespace env {
export namespace backends {
export { onnx_env as onnx };
export let tfjs: {};
}
export { __dirname };
export { VERSION as version };
export let allowRemoteModels: boolean;
export let remoteHost: string;
export let remotePathTemplate: string;
export let allowLocalModels: boolean;
export { localModelPath };
export { FS_AVAILABLE as useFS };
export { WEB_CACHE_AVAILABLE as useBrowserCache };
export { FS_AVAILABLE as useFSCache };
export { DEFAULT_CACHE_DIR as cacheDir };
export let useCustomCache: boolean;
export let customCache: any;
}
declare const onnx_env: any;
declare const __dirname: any;
declare const VERSION: "2.7.0";
declare const localModelPath: any;
declare const FS_AVAILABLE: boolean;
declare const WEB_CACHE_AVAILABLE: boolean;
declare const DEFAULT_CACHE_DIR: any;
export {};(notice difference between |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix
typegenincorrectly outputsconstfor non-readonly fields.Closes #361