diff --git a/proposal-template.md b/proposal-template.md index c928a70..f897664 100755 --- a/proposal-template.md +++ b/proposal-template.md @@ -1,16 +1,22 @@ -# ECMAScript proposal: @Name +# ECMAScript proposal: Readonly Arays and Objects - [Motivation](#motivation) - [High-level API](#high-level-api) - [FAQ](#faq) ## Motivation -Proposal motivation +Sometimes to prevent object and array changes we should to use `Object.freeze`, but the method very slow, so i propose readonly structure which will be constant by default ## High-level API ```js -// example code +const USER_STATUSES = new ReadOnly([ + "banned", + "active", + "deleted" +]); + +USER_STATUS[0] = "something" // Throw type error ``` ### FAQ