mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
gflb.ts: add comments about startsWith polyfill, making into module
This commit is contained in:
@@ -1535,6 +1535,8 @@ function isUndefined(a: any): boolean {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// A polyfill with provides the String.startsWith function for older targets
|
||||||
|
// If you are targeting ES6(2015) or later, you don't need this
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill
|
||||||
// if (!String.prototype.startsWith) {
|
// if (!String.prototype.startsWith) {
|
||||||
interface String {
|
interface String {
|
||||||
@@ -1547,3 +1549,22 @@ Object.defineProperty(String.prototype, 'startsWith', {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// If you want to make this into a proper module, uncomment this:
|
||||||
|
// export {
|
||||||
|
// GFGrammar,
|
||||||
|
// GFAbstract,
|
||||||
|
// GFConcrete,
|
||||||
|
// Fun,
|
||||||
|
// Type,
|
||||||
|
// Apply,
|
||||||
|
// Coerce,
|
||||||
|
// PArg,
|
||||||
|
// Const,
|
||||||
|
// CncFun,
|
||||||
|
// SymCat,
|
||||||
|
// SymKS,
|
||||||
|
// SymKP,
|
||||||
|
// SymLit,
|
||||||
|
// Alt,
|
||||||
|
// }
|
||||||
|
|||||||
Reference in New Issue
Block a user